I have a script which has two output formats in which i'am getting the two different output format in str1 and str2.So i want to get the output if the format is like str1 then i have to copy that into a directory or str2 format means it should be moved.This script i'am executing in shell script in aix server .so guys kindly help me out in this.
#!/bin/bash
source_path=/tmp
destination_path=/scripts
pwd
str1=`hostname`.`date "+%d%m%y%k"`* #str1 and str2 two format files from/tmp
str2=Ma.`hostname`.`date "+%d%m%y%k"`*
source_path=$str1,$str2;
if [ $str1 == $str2 ]
then
echo "output is equal"
echo mv "$source_path $destination_path"
else
echo "output is not equal"
echo mv "$source_path $destination_path"
fi
exit 0
---------- Post updated at 02:54 PM ---------- Previous update was at 02:53 PM ----------