i,
Could someone please help me figure out why:
GNU bash, version 3.2.25(1)-release-(x86_64-redhat-linux-gnu)
1) Why when I do an echo, I get /bin/sh returned as well ?
For example, my script below called crond.sh:
#!/bin/bash
SERVICE='crond'
HOST=`hostname`
content=`ps auxw | grep [c]rond| a
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 y
Mike Frysinger wrote:
> 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 gr