Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

bash netcat eof, 192.168.1.41:8000, Www.xxxcon., %s wwwxxxcon, %s wwwxxxcon, www.xxxcon, xxxxdup, bitlord outgoing port settings, ckowwwxxx, 192.168.1.41:8000/nor-482.html

Links

XODOX
Impressum

#1: Comparing Files

Posted on 2008-04-24 16:26:32 by invincible

all,

Any better ideas on implementing the below....?
..
..
..
..
..
#Listing Missing Processes from the system
>tmp1.out
rsh $server cat /home/basks.tbl >>tmp1.out
if [ -e tmp1.out ]
then
echo "Missing Process on system are " >>check_ps.out
diff tmp1.out proc-list|awk '{ print $2 }' >>check_ps.out
else
echo "File NOT Found !!!! " >>check_ps.out
fi
done

I have a list of processes in proc-list which want to compare with the
ones on the system from /home/basks.tbl

The problem with diff is it gives unwanted spaces in file.

Thankyou

Report this message

#2: Re: Comparing Files

Posted on 2008-04-24 16:47:07 by mop2

What is "unwanted spaces"?
Is more than one space between words?
For this last:
diff tmp1.out proc-list|awk '{ print $2 }'|tr -s ' ' >>check_ps.out

Sample is best than thousand words. :)


invincible wrote:
> all,
>
> Any better ideas on implementing the below....?
> .
> .
> .
> .
> .
> #Listing Missing Processes from the system
> >tmp1.out
> rsh $server cat /home/basks.tbl >>tmp1.out
> if [ -e tmp1.out ]
> then
> echo "Missing Process on system are " >>check_ps.out
> diff tmp1.out proc-list|awk '{ print $2 }' >>check_ps.out
> else
> echo "File NOT Found !!!! " >>check_ps.out
> fi
> done
>
> I have a list of processes in proc-list which want to compare with the
> ones on the system from /home/basks.tbl
>
> The problem with diff is it gives unwanted spaces in file.
>
> Thankyou

Report this message

#3: Re: Comparing Files

Posted on 2008-04-24 17:10:53 by OldSchool

On Apr 24, 10:26=A0am, invincible <imanuk2...@googlemail.com> wrote:
> all,
>
> Any better ideas on implementing the below....?
> .
> .
> .
> .
> .
> #Listing Missing Processes from the system>tmp1.out
>
> rsh $server cat /home/basks.tbl >>tmp1.out
> if [ -e tmp1.out ]
> then
> echo "Missing Process on system are " >>check_ps.out
> diff tmp1.out proc-list|awk '{ print $2 }' >>check_ps.out
> else
> echo "File NOT Found !!!! " >>check_ps.out
> fi
> done
>
> I have a list of processes in proc-list which want to compare with the
> ones on the system from /home/basks.tbl
>
> The problem with diff is it gives unwanted spaces in file.
>
> Thankyou

are you saying that tmp1.out contains blank lines, and that these are
being reported as differences? If so, try

sed "/^ *$/d" tmp1.out | diff - proc_list | awk.......

Report this message