On Tuesday 20 December 2011 17:18:16 kc123 wrote: > For example, my script below called crond.sh: > ... > content=`ps auxw | grep [c]rond| awk '{print $11}'` > ... > and output is: > CONTENT: /bin/bash /bin/bash crond > > Why are there 2 extra arguments printed (/bin/bash) ?
because you grepped your own script named "crond.sh" make the awk script smarter, or use pgrep -mike
signature.asc
Description: This is a digitally signed message part.