RH List Fellows:
I use the following shell script that I invoke at the command line that
"bulk" updates my production web server (windoze 2k + cygwin) via ssh on
my staging server (rhl8)
#!/bin/sh
#
# rsync -rtplzv --delete -e ssh ./stage-docroot \
# [EMAIL PROTECTED]:/cygdrive/c/usr/local/apac
[ 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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
tim wrote:
> Faced with having to re-ip a set of machines that have ip address hard
>coded all over the place in various application and system configuration
>files, what would be the best way to globally change them?
while () {
s/^BOOTPROT0
Hi there,
Faced with having to re-ip a set of machines that have ip address hard
coded all over the place in various application and system configuration
files, what would be the best way to globally change them?
I'm thinking of a find and xargs perl replace sort of thing.
Any better ideas?
This
Gate wrote:
> Can anyone give me a hand? Thanks in advance!
I got bored, so I wrote the attached perl script. It does pretty close
to what you said you wanted, but I wrote it the way I think such a
script should be written. It should be easier to use in the future, if
you need to do something v
On Thu, 13 Apr 2000, Gate wrote:
> What I need is this.
>
> -# of times user logged in to nas Bud-PM2
> -Total number of logins
> -Username
> -All ONLY correct logins (i.e. the "Login OK").
>
> and printed to a file like this:
>
> username:Budlogs:Totlogs
>
> Can anyone give me a hand? Thanks
I have a logfile that contains entries like so:
Wed Apr 12 04:45:04 2000: Auth: Login OK: [user/test123] (from nas
Weis-PM3)
Wed Apr 12 04:45:04 2000: Auth: Login OK: [user2/123test] (from nas
Bud-PM2)
Wed Apr 12 04:41:09 2000: Auth: Login incorrect: [user3/1badpass] (from
nas Weis-PM3)
Each is
I have a logfile that contains entries like so:
Wed Apr 12 04:45:04 2000: Auth: Login OK: [user/test123] (from nas
Weis-PM3)
Wed Apr 12 04:45:04 2000: Auth: Login OK: [user2/123test] (from nas
Bud-PM2)
Wed Apr 12 04:41:09 2000: Auth: Login incorrect: [user3/1badpass] (from
nas Weis-PM3)
Each is
At 20:27 +1000 13/12/99, a mole wrote:
>'unowned' files in /etc so.. Assuming I didn't misunderstand your problem
>I think this should work out...
Excellent... chugged away and fixed everything... well after changing
the chmod to "chmod $mode, $targfile" - the only problem was that the
script
I didn't run this, but it looks like your chmod line should read
chmod $mode, $targfile;
instead (you where chmoding the backup). Anyway, I do believe this
addresses his problem.
charles
On Mon, 13 Dec 1999, a mole wrote:
> #!/usr/bin/perl
>
> use strict;
> use File::Basename;
> use IO::File;
Hey Dan,
RPM has a fairly groovey feature which will let you reset the
permissions to match their stored values in the rpm database. For
starters something like...
rpm -q -a | xargs rpm --setperms
... will set most of your box to rights. Except there are quite a few
'unowned'
ok - here's the scenario...
I stupidly managed to change all the files in my /etc/ directory to
755 permissions (directories too) and now things are complaining and
I also think that this is not a very secure way for my /etc/
directory to be...
I have a backup of this directory with all the c
23 matches
Mail list logo