Script of snoop

From: rmckeever (rmckeever@earthlink.net)
Date: Thu Oct 03 2002 - 17:10:02 EDT


Hello and Help,

Im tring to have this existing script do a new command. It was written in csh.
Orginal:

called start
#!/bin/csh -f
set NAME=$1
set DATE=`date +%y%m%d.%H%M`
while (1)
  /usr/sbin/snoop -d hme0 -o ${NAME}.capture.${DATE} "`cat ${NAME}.req`" >&
${NAME}.log.${DATE}
end

So in the dir when you run "start" the syntax is like so

./start filename.req (and the file "filename.req" is in the same dir)

then it creates two files (*.capture.* and *.log.*)...Cool

Now I want to run this New line after the first line:

/usr/sbin/snoop -i ${NAME}.capture.${DATE} -V -t a | grep GET >>
GETfile${NAME}.${DATE}

So the new script looks like this:

#!/bin/csh -f
set NAME=$1
set DATE=`date +%y%m%d.%H%M`
while (1)
    /usr/sbin/snoop -d hme0 -o ${NAME}.capture.${DATE} "`cat ${NAME}.req`" >&
${NAME}.log.${DATE}
sleep 2
   /usr/sbin/snoop -i ${NAME}.capture.${DATE} -V -t a | grep GET >>
GETfile${NAME}.${DATE}
end

I tried this :
csh -x ./start 111.111.111.111
set NAME=111.111.111.111
set DATE=`date +%y%m%d.%H%M`
date +%y%m%d.%H%M
while ( 1 )
cat 111.111.111.111.req
 
It never reads my new line it just sits at "cat"!!!

I'm sure its something stupid, but I get find it. Thanks Upfront

Rob
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:02 EDT