The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 11-07-2007
moustik moustik is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 18
Thanks ranj@chn

it's very interesting.

It helps me to get less unuseful data file.

But it's not working as well. If I do the test with a=b and c diff d I always get the same answer rather I should get a=b ok c=d not ok

Sure filename cannot be used for that so I create a function here below :

test ()
{
cat $1 |
grep [*.Z] |
awk '{print $5}' |
sed -e 's/printing//g' -e 's/(8192//g' -e 's/on.//g' -e '/^$/d'

test "$INFOSYSL" > "$DIRLOG/ISL"
test "$INFOSYSF" > "$DIRLOG/ISF"
test "$INFONETL" > "$DIRLOG/INL"
test "$INFONETF" > "$DIRLOG/INF"

a=$ISL
b=$ISF
c=$INL
d=$INF

export a b c d

if [ "$a" -eq "$b" ]; then
echo "Sys File sizes match"
else echo "Sys File sizes differ Errror"
fi >> $MAIL

if [ "$c" -eq "$d" ]; then
echo "net File sizes match"
else echo "Net File sizes differ Errror"
fi >> $MAIL