[ 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
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
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
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
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,
[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
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
>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
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
* [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
[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
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
12 matches
Mail list logo