RE: Bash script help ?

2003-02-05 Thread David Simmons
[ test ] then Dave -Original Message- From: R P Herrold [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 12:11 PM To: [EMAIL PROTECTED] Subject: RE: Bash script help ? On Wed, 5 Feb 2003, David Simmons wrote: > I have noticed in this thread that everyone is puttin

RE: Bash script help ?

2003-02-05 Thread R P Herrold
On Wed, 5 Feb 2003, David Simmons wrote: > I have noticed in this thread that everyone is putting a ";" after their > tests: if [ test ] ; and for [ test ] ; > > When is the ";" required or is it always required after the test in a > conditional statement? Ehhh? Not all people do. I never

Re: Bash script help ?

2003-02-05 Thread Raymundo M. Vega
quot; required or is it always required after the test in a conditional statement? Thanks, Dave Simmons -Original Message- From: Raymundo M. Vega [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 11:00 AM To: [EMAIL PROTECTED] Subject: Re: Bash script help ? I think sev

RE: Bash script help ?

2003-02-05 Thread David Simmons
undo M. Vega [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 11:00 AM To: [EMAIL PROTECTED] Subject: Re: Bash script help ? I think several lines are not quite right: - regular expression in gawk should be inside the {}, but you will have to pass the argument to gawk. - next line aft

Re: Bash script help ?

2003-02-05 Thread Raymundo M. Vega
I think several lines are not quite right: - regular expression in gawk should be inside the {}, but you will have to pass the argument to gawk. - next line after if should be then, it is usually used like if [ -z "$processid" ] ; then the script will only echo first time it finds the string,

Re: Bash script help ?

2003-02-05 Thread Ryan Babchishin
[EMAIL PROTECTED] wrote: I'm trying to get a pidof a php script by capturing the path: like /home/somebody/my_script which will be the first arg. to the bash script Could anybody tell me what's wrong with this script ? I'm new to scripting in general so any help would be apreciated ! #!/bin/ba

Re: Bash script help ?

2003-02-05 Thread Lars
On Wednesday, February 5, 2003, at 02:24 PM, Jan wrote: In your awk stmt you search for '1st_arg' rather than the value of the variable 1st_arg, which would be $1st_arg - or perhaps ${1st_arg}, as $1 is something else... Ok ! Thanks ! Lars -- redhat-list mailing list unsubscribe mailto:[E

Re: Bash script help ?

2003-02-05 Thread lardi
>Jon Haugsand wrote: >> * [EMAIL PROTECTED] >> >>>#!/bin/bash >>>1st_arg=$1 >> >> number not allowed in front. >> >> >>>prosesses=`lsof -i` >>>prosessid=`echo $prosesses | gawk /1st_arg/'{print $2}'` >> >> Cannot understand this to work in gawk. In any case, you might do >> this a lot more e

Re: Bash script help ?

2003-02-05 Thread Jan
Jon Haugsand wrote: * [EMAIL PROTECTED] #!/bin/bash 1st_arg=$1 number not allowed in front. prosesses=`lsof -i` prosessid=`echo $prosesses | gawk /1st_arg/'{print $2}'` Cannot understand this to work in gawk. In any case, you might do this a lot more effective: echo $prosessid if [ -z

Re: Bash script help ?

2003-02-05 Thread Jon Haugsand
* [EMAIL PROTECTED] > #!/bin/bash > 1st_arg=$1 number not allowed in front. > prosesses=`lsof -i` > prosessid=`echo $prosesses | gawk /1st_arg/'{print $2}'` Cannot understand this to work in gawk. In any case, you might do this a lot more effective: > echo $prosessid > if [ -z "$prosessid" ] mis

Re: Bash script help ?

2003-02-05 Thread Jan
[EMAIL PROTECTED] wrote: I'm trying to get a pidof a php script by capturing the path: like /home/somebody/my_script which will be the first arg. to the bash script Could anybody tell me what's wrong with this script ? I'm new to scripting in general so any help would be apreciated ! #!/bin/ba

Bash script help ?

2003-02-05 Thread lardi
I'm trying to get a pidof a php script by capturing the path: like /home/somebody/my_script which will be the first arg. to the bash script Could anybody tell me what's wrong with this script ? I'm new to scripting in general so any help would be apreciated ! #!/bin/bash 1st_arg=$1 prosesses=`l