You need to get the file sizes into the variables. For ex,
Code:
a=`wc -c filename1 | nawk '{print $1}` ## can use a combination of ls and nawk too
b=`wc -c filename2 | nawk '{print $1}'` ## can use a combination of ls and nawk too
##Have used nawk as you have mentioned Solaris. Please change to 'awk' otherwise
Now, the
if syntax should work correct. Filenames cannot be used to compare the contents of the files!!!