Oct 11, 2010 #1 rigstars1 Instructor Oct 2, 2010 19 US This command greps for 'unlinkd' which works fine ps -l -u squid | grep unlinkd | cut -c 96-102 but as soon as I put it in a script ..the output is always the word 'UID' Any one know why that is? variable=(`ps -l -u squid` "| grep unlinkd | cut -c 96-102")
This command greps for 'unlinkd' which works fine ps -l -u squid | grep unlinkd | cut -c 96-102 but as soon as I put it in a script ..the output is always the word 'UID' Any one know why that is? variable=(`ps -l -u squid` "| grep unlinkd | cut -c 96-102")
Oct 12, 2010 #2 PHV MIS Nov 8, 2002 53,708 FR Code: variable=`ps -l -u squid | grep unlinkd | cut -c 96-102^ Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Code: variable=`ps -l -u squid | grep unlinkd | cut -c 96-102^ Hope This Helps, PH. FAQ219-2884 FAQ181-2886
Oct 12, 2010 Thread starter #3 rigstars1 Instructor Oct 2, 2010 19 US PHV - I'm not sure what the '^' does but it didn't work. I just misplaced my backticks. Now it works. Nice try though. Appreciate the effort. `ps -l -u squid | grep unlinkd | cut -c 96-102` Upvote 0 Downvote
PHV - I'm not sure what the '^' does but it didn't work. I just misplaced my backticks. Now it works. Nice try though. Appreciate the effort. `ps -l -u squid | grep unlinkd | cut -c 96-102`
Oct 12, 2010 #4 PHV MIS Nov 8, 2002 53,708 FR Sorry for the typo. Obviously the ^ should be read as ` Upvote 0 Downvote