I want to line count the two files and comare the output

August 4, 2012 at 07:59:40
Specs: Windows Vista
I want to compare the 2 file count to determine the next step of execution in unix shell script.


for eamaple for file1, file2

command1 = wc file1 | awk '{print $1}' > count1
command2 = wc file2 | awk '{print $1}' > count2

IF [ "cat $count1" < "cat $count2" ] ; then

step1
else
step2
fi.

In the above the if statment is not right.
How can I change the command so that I can get the expected result.
Any help will be much appreciated.


See More: I want to line count the two files and comare the output

Report •

#1
August 4, 2012 at 08:10:39
You list your OS as Vista, but your code is confused bash.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question