Matt wrote:
I have a script file in my cron.hourly that contains a good number of
scripts I must call.
#!/bin/sh
sleep 15
perl /scripts/create_graph.pl
sleep 15
perl /scripts/create_graph_out.pl
many more lines. etc.
Is there a way I can sleep random length to time before executing
On Fri, Sep 6, 2013 at 8:44 AM, Nicolas Thierry-Mieg
nicolas.thierry-m...@imag.fr wrote:
Matt wrote:
I have a script file in my cron.hourly that contains a good number of
scripts I must call.
#!/bin/sh
sleep 15
perl /scripts/create_graph.pl
sleep 15
perl
I have a script file in my cron.hourly that contains a good number of
scripts I must call.
#!/bin/sh
sleep 15
perl /scripts/create_graph.pl
sleep 15
perl /scripts/create_graph_out.pl
many more lines. etc.
Is there a way I can sleep random length to time before executing each
but background
On Thu, Sep 05, 2013 at 10:24:55AM -0500, Matt wrote:
I have a script file in my cron.hourly that contains a good number of
scripts I must call.
#!/bin/sh
sleep 15
perl /scripts/create_graph.pl
sleep 15
perl /scripts/create_graph_out.pl
many more lines. etc.
Don't background
LIMIT=10 # Or whatever
sleep `expr $RANDOM % $LIMIT + 1`
-Original Message-
From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On Behalf Of
Matt
Sent: 05 September 2013 16:25
To: CentOS mailing list
Subject: [CentOS] Shell Script Help
I have a script file in my
On 09/05/2013 11:24 AM, Matt wrote:
I have a script file in my cron.hourly that contains a good number of
scripts I must call.
#!/bin/sh
sleep 15
perl /scripts/create_graph.pl
sleep 15
perl /scripts/create_graph_out.pl
many more lines. etc.
Is there a way I can sleep random
Hey Guys n Gals;
I have some arrays that I can't seem to expand correctly (if that's
the correct word?), imagine the following example:
#!/bin/bash
myArray=(First Second Third)
First=(Monday Tuesdays Wednesday)
Second=(One Two Three)
Third=(A B C)
for ((i=0;i${#myarr...@]};i++))
do
for
On Fri, Jun 19, 2009 at 8:43 AM, James Bensley jwbens...@gmail.com wrote:
Hey Guys n Gals;
I have some arrays that I can't seem to expand correctly (if that's
the correct word?), imagine the following example:
#!/bin/bash
myArray=(First Second Third)
First=(Monday Tuesdays Wednesday)
On Thu, May 14, 2009 at 1:31 AM, James Bensley jwbens...@gmail.com wrote:
if you're already going to the effort of downloading the entire
blacklist every night, why not dump the old database, and just insert
the newly downloaded one?
Because we also add our own entries to the current
On Tue, 2009-05-19 at 22:06 -0400, Eric Sisolak wrote:
Also you could try
for FOLDER in `find /usr/local/squidGuard/db -maxdepth 1 -type d`; do
This is a classic mistake. It has two problems:
1) The list of files created by the embedded find can exceed the maximum
command length.
2)
I have written my script but I wanted to add this on before and after
the update to see the difference but all it returns are zeros? Anyone
have any idea why?
#!/bin/sh
f=0 #Folder count
d=0 #Domains count (one per line in each file)
u=0 #Url count (one per line in each file)
t=0 #Total of
Update: these lines should be:
+ $X
d=`expr $d + 1`
and
snip
u=`expr $u + 1`
fi
done
James ;)
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GIT/MU/U dpu s: a-- C++$ U+ L++ B- P+ E? W+++$ N K W++ O M++$ V-
PS+++ PE++ Y+ PGP t 5 X+ R- tv+ b+ DI D+++
On Thu, 14 May 2009 12:35:13 +0100
James Bensley jwbens...@gmail.com wrote:
Update: these lines should be:
+ $X
that should be lower case.
My guess is that because your variables all equal zero, it's possible
that something is wrong with:
find /usr/local/squidGuard/db -maxdepth 1 -type d |
On Fri, May 15, 2009 at 10:17:21AM +1200, Spiro Harvey wrote:
My guess is that because your variables all equal zero, it's possible
that something is wrong with:
find /usr/local/squidGuard/db -maxdepth 1 -type d | while read FOLDER;
More likely he's using a shell that runs the while loop in
Hey Listee's
I am trying to write a shell script to sort and compare my blacklist
for squidGuard with the nightly updates that come down in a tar ball.
It should be rather simple but I'm not to grate at this. The script is
to run nightly, it will download the latest blacklist tarball, un tar
it
to run nightly, it will download the latest blacklist tarball, un tar
it and then add any new entries to the existing black list. The
if you're already going to the effort of downloading the entire
blacklist every night, why not dump the old database, and just insert
the newly downloaded one?
if you're already going to the effort of downloading the entire
blacklist every night, why not dump the old database, and just insert
the newly downloaded one?
Because we also add our own entries to the current blacklist so we are
just adding any new entries from the nightly updates of our
I have to run multiple command about 20x on linux each one got his
own output, I want to bind all the out puts of them in one file then
read this file and mail it to user account
sample
[r...@imail pons]# /home/pons/tsmmonitor stgpool SDC-STAFF
stgpool - utilization of storage pool SDC-STAFF
Hi Mad Unix,
On Sun, Feb 8, 2009 at 09:06, Mad Unix madu...@gmail.com wrote:
I have to run multiple command about 20x on linux each one got his
own output,
It is not the first time you come to the list with questions about
shell scripting, and most of them very basic. So, what I really
resolved.
On Sun, Feb 8, 2009 at 4:33 PM, Filipe Brandenburger
filbran...@gmail.com wrote:
Hi Mad Unix,
On Sun, Feb 8, 2009 at 09:06, Mad Unix madu...@gmail.com wrote:
I have to run multiple command about 20x on linux each one got his
own output,
It is not the first time you come to the
Mad Unix wrote:
I have to run multiple command about 20x on linux each one got his
own output, I want to bind all the out puts of them in one file then
read this file and mail it to user account
sample
[r...@imail pons]# /home/pons/tsmmonitor stgpool SDC-STAFF
stgpool - utilization of
On Sun, Feb 8, 2009 at 9:52 AM, Chris Geldenhuis
chris.gel...@iafrica.comwrote:
Mad Unix wrote:
I have to run multiple command about 20x on linux each one got his
own output, I want to bind all the out puts of them in one file then
read this file and mail it to user account
sample
Matt Shields wrote:
On Sun, Feb 8, 2009 at 9:52 AM, Chris Geldenhuis
chris.gel...@iafrica.com mailto:chris.gel...@iafrica.com wrote:
Mad Unix wrote:
I have to run multiple command about 20x on linux each one got his
own output, I want to bind all the out puts of them in one
You want this and I want a grapefruit. Thanks for you attitude.
Kai
--
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
___
CentOS mailing list
CentOS@centos.org
On Sun, Feb 8, 2009 at 10:02 AM, Chris Geldenhuis
chris.gel...@iafrica.comwrote:
Matt Shields wrote:
On Sun, Feb 8, 2009 at 9:52 AM, Chris Geldenhuis
chris.gel...@iafrica.com mailto:chris.gel...@iafrica.com wrote:
Mad Unix wrote:
I have to run multiple command about 20x on
Hi,
I need a script which makes the package compação rpm's through two
text files ...
Since a file is the output of the command *rpm-qa pkg.out *
And the second file is a list of several packages rpm's, multiple
versions and architectures.
My idea is to
On Mon, 2009-01-26 at 08:26 -0200, Tiago Dias wrote:
Hi,
I need a script which makes the package compação rpm's
through two text files ...
Since a file is the output of the command rpm-qa pkg.out
And the second file is a list of several packages rpm's,
From: Tiago Dias tux.ti...@gmail.com
I need a script which makes the package compação rpm's through two text files
...
Since a file is the output of the command rpm-qa pkg.out
And the second file is a list of several packages rpm's, multiple versions
and architectures.
Just for the
Bob Beers wrote:
grep group_name: /etc/group | cut -d: -f4
will give a comma separated list, provided group_name is a valid group name.
There is one problem with this approach, which is the assumption that
all users' primary group is the same as their login id - which I agree
is typically
Part 1:
On Tue, Sep 23, 2008 at 7:37 PM, Ian Blackwell [EMAIL PROTECTED] wrote:
Bob Beers wrote:
grep group_name: /etc/group | cut -d: -f4
will give a comma separated list, provided group_name is a valid group
name.
There is one problem with this approach, which is the assumption that
Bob Beers wrote:
Part 1:
You have a valid point, but the OP's question was:
I am looking for a (simple) shell command to run from a bash script
that will allow me to list user accounts that belong to a particular
group.
In all likelihood the system follows the default approach of
I have several shell scripts to manage user accounts on a server. I've
been using a file with the usernames of peoples accounts that any script
needs to process. I had a thought that I can and should be setting up
groups and adding user accounts to those groups so I don't have to
maintain a
Quoting Tim Alberts [EMAIL PROTECTED]:
I have several shell scripts to manage user accounts on a server. I've
been using a file with the usernames of peoples accounts that any script
needs to process. I had a thought that I can and should be setting up
groups and adding user accounts to
On Tue, Sep 23, 2008 at 1:31 PM, Tim Alberts [EMAIL PROTECTED] wrote:
So essentially, I am looking for a (simple) shell command to run from a bash
script that will allow me to list user accounts that belong to a particular
group. Any help is appreciated.
grep group_name: /etc/group | cut -d:
Barry Brimer wrote:
With spaces separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4 }' | sed -e 's/,/ /g'
With commas separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4 }'
I'm sorry, I didn't specify, I'm using LDAP for user/group management.
On Tue, Sep 23, 2008 at 7:11 PM, Tim Alberts [EMAIL PROTECTED] wrote:
Barry Brimer wrote:
With spaces separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4 }' | sed -e 's/,/
/g'
With commas separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4
Quoting Tim Alberts [EMAIL PROTECTED]:
Barry Brimer wrote:
With spaces separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4 }' | sed -e 's/,/
/g'
With commas separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4 }'
I'm sorry, I didn't
On Tue, Sep 23, 2008 at 7:26 PM, Barry Brimer [EMAIL PROTECTED] wrote:
Quoting Tim Alberts [EMAIL PROTECTED]:
Barry Brimer wrote:
With spaces separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4 }' | sed -e 's/,/
/g'
With commas separating groups:
egrep -e
Bob Beers wrote:
On Tue, Sep 23, 2008 at 7:26 PM, Barry Brimer [EMAIL PROTECTED] wrote:
With commas separating groups:
getent group | egrep -i '^groupname:' | awk -F : '{ print $4}'
With spaces separating groups:
getent group | egrep -i '^groupname:' | awk -F : '{ print $4}' | sed -e
On Tue, 23 Sep 2008, Bob Beers wrote:
On Tue, Sep 23, 2008 at 7:26 PM, Barry Brimer [EMAIL PROTECTED] wrote:
Quoting Tim Alberts [EMAIL PROTECTED]:
Barry Brimer wrote:
With spaces separating groups:
egrep -e '^groupname:' /etc/group | awk -F : '{ print $4 }' | sed -e 's/,/
/g'
With
On Tue, Sep 23, 2008 at 6:43 PM, Barry Brimer [EMAIL PROTECTED] wrote:
The egrep is using a leading anchor (^) to make sure the grep matches the
beginning of the line. If not, and the group pattern matched as one of the
users it would print those lines too .. which is probably undesirable.
hi,
how to write a scripts which launches 10 pings to different
destinations at execution of single shell scripts
please help me any ideas
regards,
Gopinath
___
CentOS mailing list
CentOS@centos.org
Gopinath Achari wrote:
hi,
how to write a scripts which launches 10 pings to different
destinations at execution of single shell scripts
please help me any ideas
regards,
Gopinath
Do you mean something like:
ping -c10 host1
ping -c10 host2
which will ping host1 10 times,
Hi,
If you you want a quicker execution - you could also run the pings to
separate hosts in parallel starting the jobs in background () and waiting
for them with wait after that. You'll have to be more careful about the
outputs in that case - e.g. redirect them to separate files.
Regards,
Javor
On Mon, Jul 28, 2008, Gopinath Achari wrote:
hi,
how to write a scripts which launches 10 pings to different
destinations at execution of single shell scripts
please help me any ideas
If your goal is to test connectivity, you might look at the perl
Net::Ping module. ``perldoc
Bill Campbell escribió:
On Mon, Jul 28, 2008, Gopinath Achari wrote:
hi,
how to write a scripts which launches 10 pings to different
destinations at execution of single shell scripts
please help me any ideas
If your goal is to test connectivity, you might look at the
thank u all
On Mon, 2008-07-28 at 16:11 +0300, Javor Nikolov wrote:
Hi,
If you you want a quicker execution - you could also run the pings to
separate hosts in parallel starting the jobs in background () and
waiting for them with wait after that. You'll have to be more
careful about the
What's the simplest way to increment the number up by one until some other
4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
Thanks!
jlc
___
CentOS mailing list
CentOS@centos.org
On Wed, 9 Jul 2008, Joseph L. Casale wrote:
What's the simplest way to increment the number up by one until some other
4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
In zsh, it would be something like:
for i in {..}; do
echo $i
On Wed, Jul 9, 2008 at 6:22 PM, Joseph L. Casale
[EMAIL PROTECTED] wrote:
What's the simplest way to increment the number up by one until some
other 4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
Your homework done in a snap!
for (i=0;
Your homework done in a snap!
Lol, nah, not homework :P
I don't know what I was thinking, long day. OTH, I never seq could do this as
well!
Thanks!
jlc
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
What's the simplest way to increment the number up by one until some
other 4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
Lots of answers, depending on the shell. I like this version for ksh:
typeset -Z4 a=-1
while (( a++ 1000 ))
do
Joseph L. Casale [EMAIL PROTECTED] wrote:
What's the simplest way to increment the number up by one until some
other 4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
Easy:
$ seq -f %04g
Best,
--- Les Bell, RHCE, CISSP
Craig White wrote:
That works fine one CentOS 5 (double quotes and backtics) but not on
CentOS 4.6
Thanks...I guess it's good enough for now.
Craig
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
I can
On Fri, 2008-05-16 at 17:03 +0930, Ian Blackwell wrote:
Craig White wrote:
That works fine one CentOS 5 (double quotes and backtics) but not on
CentOS 4.6
Thanks...I guess it's good enough for now.
Craig
___
CentOS mailing list
On my CentOS 4.6 server, this works...
if [ -z `grep entry_chooser.js /var/log/httpd/access_log` ]
On my CentOS 5.1 server, this gives me the following error...
./test_file.scr: line 3: [: too many arguments
Can anyone explain why the difference and suggest something that makes
both cases
Craig White wrote:
On my CentOS 4.6 server, this works...
if [ -z `grep entry_chooser.js /var/log/httpd/access_log` ]
On my CentOS 5.1 server, this gives me the following error...
./test_file.scr: line 3: [: too many arguments
Can anyone explain why the difference and suggest something that
On Fri, May 16, 2008 at 02:07:10PM +0930, Ian Blackwell alleged:
Craig White wrote:
On my CentOS 4.6 server, this works...
if [ -z `grep entry_chooser.js /var/log/httpd/access_log` ]
On my CentOS 5.1 server, this gives me the following error...
./test_file.scr: line 3: [: too many
On Fri, 2008-05-16 at 14:07 +0930, Ian Blackwell wrote:
Craig White wrote:
On my CentOS 4.6 server, this works...
if [ -z `grep entry_chooser.js /var/log/httpd/access_log` ]
On my CentOS 5.1 server, this gives me the following error...
./test_file.scr: line 3: [: too many arguments
On Thu, 2008-05-15 at 22:00 -0700, Garrick Staples wrote:
On Fri, May 16, 2008 at 02:07:10PM +0930, Ian Blackwell alleged:
Craig White wrote:
On my CentOS 4.6 server, this works...
if [ -z `grep entry_chooser.js /var/log/httpd/access_log` ]
On my CentOS 5.1 server, this gives me the
On Thu, Mar 13, 2008 at 12:04 PM, Jerry Geis [EMAIL PROTECTED] wrote:
hi all,
If I have a shell script on 5.1 that has 2 commands in the script...
command1
command2
and command1 runs until it is kill'ed by some other process. Sometimes
command2 runs and sometimes it
doesnt (this is what
hi all,
If I have a shell script on 5.1 that has 2 commands in the script...
command1
command2
and command1 runs until it is kill'ed by some other process. Sometimes
command2 runs and sometimes it
doesnt (this is what it seems like).
How can I be ensured that command2 will always run after
On Thursday 13 March 2008 22:04:23 Jerry Geis wrote:
If I have a shell script on 5.1 that has 2 commands in the script...
command1
command2
and command1 runs until it is kill'ed by some other process. Sometimes
command2 runs and sometimes it
doesnt (this is what it seems like).
How can I
On Thu, Mar 13, 2008 at 11:04:23AM -0400, Jerry Geis alleged:
hi all,
If I have a shell script on 5.1 that has 2 commands in the script...
command1
command2
and command1 runs until it is kill'ed by some other process. Sometimes
command2 runs and sometimes it
doesnt (this is what it
On Thu, Mar 13, 2008 at 10:29:58PM +0700, Fajar Priyanto alleged:
On Thursday 13 March 2008 22:04:23 Jerry Geis wrote:
If I have a shell script on 5.1 that has 2 commands in the script...
command1
command2
and command1 runs until it is kill'ed by some other process. Sometimes
65 matches
Mail list logo