Re: Script treats variable as command

2003-10-17 Thread lrnobs
t; Sent: Friday, October 17, 2003 10:22 PM Subject: Re: Script treats variable as command > On Sat, 2003-10-18 at 10:56, lrnobs wrote: > > I found a script for setting iptables on the internet that I like so far. > > > > The author declares some variables and then uses them l

Re: Script treats variable as command

2003-10-17 Thread Ed Greshko
On Sat, 2003-10-18 at 10:56, lrnobs wrote: > I found a script for setting iptables on the internet that I like so far. > > The author declares some variables and then uses them later on in the script > ie IFACE="eth0" > > When I try to run the script with ./iptables.rules I get a message that >

RE: Script to check if a service is running...restart if not

2003-10-08 Thread Jason Staudenmayer
ss [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2003 1:15 PM To: [EMAIL PROTECTED] Subject: Re: Script to check if a service is running...restart if not On Wed, Oct 08, 2003 at 10:03:19AM -0700, John L wrote: > Good morning. I'm looking for an example of a script that I can r

Re: Script to check if a service is running...restart if not

2003-10-08 Thread Hal Burgiss
On Wed, Oct 08, 2003 at 10:03:19AM -0700, John L wrote: > Good morning. I'm looking for an example of a script that I can run > as a cron job every five minutes that will check to see if a daemon > is running (named) and restart it if it is not. Rough, and untested ... service $service status &>

Re: Script for moving directories

2003-10-02 Thread Rodolfo J. Paiz
At 15:31 10/2/2003, you wrote: Hi, I've some files being sftpd into one my servers running Red Hat 9. I need to move the contents of the destination directory (say testdir) which includes sub directories (test1 and test2) to another directory (newdir) with the same sub directories. When I tried

Re: Script for moving directories

2003-10-02 Thread Bret Hughes
On Thu, 2003-10-02 at 16:31, Peramslist wrote: > Hi, > I've some files being sftpd into one my servers running Red Hat 9. > I need to move the contents of the destination directory (say testdir) which > includes sub directories (test1 and test2) to another directory (newdir) with the > same su

Re: script to monitor diskspace

2003-09-19 Thread Nurullah Akkaya
here is the one i used on a aix machine #!/bin/ksh LOGFILE=/oracle/KLT/brarchive.log EMPTY_LOG=/oracle/KLT/empty_log.log AWK_EXECUTABLE=awk echo "BRARCHIVE BOS ALANI KONTROL EDIYOR\n" >> $EMPTY_LOG if [ -n "$1" ] ; then drive_number=$1 else exit fi used_space=`df $drive_number |grep "$drive_numb

RE: script to monitor diskspace

2003-09-19 Thread Marvin Blackburn
s > Sent: Friday, September 19, 2003 2:33 PM > To: [EMAIL PROTECTED] > Subject: Re: script to monitor diskspace > > > On Fri, 19 Sep 2003 08:41:11 -0400 > Marvin Blackburn <[EMAIL PROTECTED]> wrote: > > > Does anyone have a shell script or procedure to monitor dis

Re: script to monitor diskspace

2003-09-19 Thread Sean Estabrooks
On Fri, 19 Sep 2003 08:41:11 -0400 Marvin Blackburn <[EMAIL PROTECTED]> wrote: > Does anyone have a shell script or procedure to monitor disk space. > i.e. notify someone when a filesystem gets too big? > Lots of ways to do this of course. One simplistic way is to add the following line to one

Re: Script using sed or awk

2003-09-05 Thread Bret Hughes
On Fri, 2003-09-05 at 13:12, Patrick Nelson wrote: > RH9 > > Have a php page and I want the outcome of > > du -hs /var/spool/imap/$username | awk '{print $1}' > > however, username is (say) joe.user.example.com but the directory is > joe^user^example^com > > Any sed or awk experts help me do t

Re: Script using sed or awk

2003-09-05 Thread Tiago Ferraz Machado - estagiario
However, if you want, here goes the "sed" solution: du -sh /var/spool/mail/`echo -e $USERNAME | sed 's/\./^/'` []`s Tiago. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list

Re: Script using sed or awk

2003-09-05 Thread John P Verel
On 09/05/03 11:12 -0700, Patrick Nelson wrote: > RH9 > > Have a php page and I want the outcome of > > du -hs /var/spool/imap/$username | awk '{print $1}' > > however, username is (say) joe.user.example.com but the directory is > joe^user^example^com > > Any sed or awk experts help me do this

Re: Script using sed or awk

2003-09-05 Thread Benjamin J. Weiss
> RH9 > > Have a php page and I want the outcome of > > du -hs /var/spool/imap/$username | awk '{print $1}' > > however, username is (say) joe.user.example.com but the directory is > joe^user^example^com > > Any sed or awk experts help me do this in one line? The output is > simply the amount of s

RE: script problem at startup

2002-11-12 Thread Don Leeper
Thanksappreciate the help.. -Original Message- From: Chuck Mead [mailto:csm@;redhat.com] Sent: Tuesday, November 12, 2002 9:22 AM To: '[EMAIL PROTECTED]' Subject: RE: script problem at startup -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 12 Nov 2002, Don Leeper

RE: script problem at startup

2002-11-12 Thread Jeff Bearer
It's the E key http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-rescuemode-booting-single.html On Tue, 2002-11-12 at 13:22, Chuck Mead wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Tue, 12 Nov 2002, Don Leeper posted the following: > > DL>What works if

Re: script problem at startup

2002-11-12 Thread Javier Gostling
On Tue, Nov 12, 2002 at 08:23:02AM -0900, Don Leeper wrote: > What works if your using grub? Editing the kernel line to add single at the end Cheers, -- Javier Gostling Ingeniero de Sistemas Virtualia S.A. [EMAIL PROTECTED] Fono: +56 (2) 202-6264 x 130 Fax: +56 (2) 342-8763 Av. Kennedy 575

RE: script problem at startup

2002-11-12 Thread Chuck Mead
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 12 Nov 2002, Don Leeper posted the following: DL>What works if your using grub? IIRC... push the "A" key and then scroll to the end of the line... input a space and then type the word "single" and hit enter. - -- [EMAIL PROTECTED], RHCE

RE: script problem at startup

2002-11-12 Thread Don Leeper
What works if your using grub? -Original Message- From: Javier Gostling [mailto:jgostling@;virtualia.cl] Sent: Tuesday, November 12, 2002 7:18 AM To: [EMAIL PROTECTED] Subject: Re: script problem at startup On Tue, Nov 12, 2002 at 07:05:21AM -0900, Don Leeper wrote: > I did a

Re: script problem at startup

2002-11-12 Thread Javier Gostling
On Tue, Nov 12, 2002 at 07:05:21AM -0900, Don Leeper wrote: > I did a boo-boo...I put a script in startup and now it hangs and won't > let it finis booting. It just sits at the point where the script is > running. How do I get into a safe mode to stop the script from starting? > Thanks.. Boot to

Re: Script fails when run without SU from cron

2002-09-25 Thread dbrett
Use the user under which the cron job will be set-up under. It will use the same envirnment david On Wed, 25 Sep 2002, Barton Hodges wrote: > I'm not sure this is the right place to ask this > question, but I'll give it a shot. > > I have a perl script that runs as a daemon, listening > on po

Re: script for ftp transfer

2002-09-23 Thread irvine
On Thu, Sep 19, 2002 at 02:45:09PM -0700, S Peram wrote: > > Hi, > Thanks a lot for the responses. > I just had a question regarding the ftp. > Is there any way I can pass all the parameters such as username, password and the >commands that are to be executed in a shell script. Hello Maybe

RE: script for ftp transfer

2002-09-19 Thread Siegert, Greg
Hi Trevor, Yes that's exactly what I was trying to find. Thanks again. Greg -Original Message- From: Trevor [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 4:40 PM To: [EMAIL PROTECTED] Subject: RE: script for ftp transfer Greg, Well, I don't use RH 7.2

Install failure [WAS Re: script for ftp transfer]

2002-09-19 Thread Michael Fratoni
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 19 September 2002 04:14 pm, Siegert, Greg wrote: > Perhaps you can help me. I'm installing RED Hat v7.3 from CD Rom. > The boot process stalls after Partition Check: hba: > > I was able to get around this before by entering something

RE: script for ftp transfer

2002-09-19 Thread S Peram
Hi, Thanks a lot for the responses. I just had a question regarding the ftp. Is there any way I can pass all  the parameters such as username, password and the commands that are to be executed in a shell script. Your suggestions and comments will be greatly appreciated.   Thanks, Peram  Trevor <[

Re: script for ftp transfer

2002-09-19 Thread Todd A. Jacobs
On Thu, 19 Sep 2002, S Peram wrote: > I was thinking of some kind of a cron job but I've run out of ideas. Try running ncftpput from a cron job on the logging system. -- "The only thing that helps me maintain my slender grip on reality is the friendship I share with my collection of singing po

RE: script for ftp transfer

2002-09-19 Thread Nick White
Title: Message I use this quick and dirty little perl script to transfer files from my Linux boxes to our windows backup server:   #!/usr/bin/perlopen (FTP, "|/usr/bin/ftp -n") || die "Can't open FTP command, $!\n";print FTP <<"EOFTP";open 192.168.1.1user username passwordbinpromptlcd /backu

RE: script for ftp transfer

2002-09-19 Thread Trevor
e.com/technologies/linux/rhl71dma/> Good luck! Trevor <http://www.gnuguy.com> -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Siegert, Greg Sent: Thursday, September 19, 2002 2:15 PM To: '[EMAIL PROTECTED]' Subject: RE: script for ftp

RE: script for ftp transfer

2002-09-19 Thread Siegert, Greg
4:03 PM To: [EMAIL PROTECTED] Subject: RE: script for ftp transfer You have many different options... tell us what is best for you and we can try help you out. 1. Use smbclient (Samba) to establish a network connection via a share on your windows machine. Set up a cron job to transfer files to you

RE: script for ftp transfer

2002-09-19 Thread Trevor
You have many different options... tell us what is best for you and we can try help you out. 1. Use smbclient (Samba) to establish a network connection via a share on your windows machine. Set up a cron job to transfer files to your box at a specific time. Use a simple 'cp' command to copy all

Re: Script to run/stop wvdial

2002-09-10 Thread Anthony E. Greene
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10-Sep-2002/12:01 +0800, Toto Gamez <[EMAIL PROTECTED]> wrote: >Im using RH72 and wvdial to connect to the internet but Im only allowed >to use the telephone from 7-9am, 12-1:30pm and 4-5pm. I'm new to >scripting but read the Intro to BASH Scriptng

Re: Script to start services... cron job

2002-09-05 Thread Anthony E. Greene
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04-Sep-2002/13:44 +0800, Ganesan Kanavathy <[EMAIL PROTECTED]> wrote: >In my company we are using sendmail for our mail server. > >For some security reason user are allowed to use the service from 8.30AM to >5.30AM (working hours) only. [snip] >Whe

Re: script help

2002-04-30 Thread David Talkington
-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

Re: SCRIPT FOR ADDUSER

2001-12-04 Thread J Hayward
On Tue, 2001-12-04 at 07:47, Alessandro Coppelli wrote: > > Hi to all. > > Is there a script that use adduser for add many client from a file > from a file with this format : > >client1 group1 fullname1 passwd1 >client2 group2 fullname2 passwd2 >client3 group3 fullanme pas

Re: Script

2001-04-21 Thread Giulio Orsero
On Sat, 21 Apr 2001 12:07:12 -0500, you wrote: >write a script called lookup. when run, lookup should find the matching >entries from a file called .addr_book and display the entry. >example lookup john doe >outputjohn doe Phone:888- #!/bin/sh grep "$*" ~/.addr_book|sort -- [EMAIL P

Re: Script

2001-04-21 Thread Mikkel L. Ellertson
On Sat, 21 Apr 2001 [EMAIL PROTECTED] wrote: > Since I'm new at Unix, I decided that I would take a Unix class. I'm at > the end of the semester and I have my last assignment. It is writting a > shell script, which the book nor the instructor covered well. I have to > write a script called lookup

Re: Script

2001-04-21 Thread rvazquez
No, actually i want some help. I did not ask for someone to write it for but to give me some help. ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list

Re: Script

2001-04-21 Thread eric clover
i need someone to do my homework too. if you can help, please let me know ...thanx Since I'm new at Unix, I decided that I would take a Unix class. I'm at the end of the semester and I have my last assignment. It is writting a shell script, which the book

Re: Script (sed/perl) to remove all quotes (") from a file?

2001-04-11 Thread Cameron Simpson
On Tue, Apr 10, 2001 at 10:09:46PM -0400, Charles Galpin <[EMAIL PROTECTED]> wrote: | For completeness of the perl version, the script below is the same as | perl -pi -e 's/"//g' filename | to do an place edit, or use -pi.bak to save a backup. My take is: bsed 's/"//g' filename Of cour

Re: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Charles Galpin
For completeness of the perl version, the script below is the same as perl -pi -e 's/"//g' filename to do an place edit, or use -pi.bak to save a backup. charles On Tue, 10 Apr 2001, Jacob Killian wrote: > #!/usr/bin/perl -w > > # $file is the file you want to strip the '"' from. > $file = /

RE: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Jacob Killian
> Warren Melnick > Director of Research and Development > Astata Corporation > > > > > -Original Message- > From: Larry Grover [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 10, 2001 3:34 PM > To: [EMAIL PROTECTED] > Subject: Re: Script (s

RE: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Warren Melnick
esday, April 10, 2001 3:34 PM To: [EMAIL PROTECTED] Subject: Re: Script (sed/perl) to remove all quotes (") from a file? http://gnosis.cx/publish/programming/regular_expressions.html The "regex" man page (section 7) is also good. -- Larry Grover, PhD Assoc Prof of Physiology Marshal

RE: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Madison, Ryan
This is a bunch of examples I use as reference on occasion. Of course use regular expressions liberally... \ Escape character, to indicate next character is not to be considered special metacharacters & Shortcut, to replace with pattern matches... . Any single character (wil

Re: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Jacob Killian
#!/usr/bin/perl -w # $file is the file you want to strip the '"' from. $file = /path/to/filename; # $tmp is the file we write w/o the '"'s $tmp = /path/to/tmp; # If you want to get $file and $tmp from the command line, remove the # previous two lines ($file... and $tmp...), and uncomment the ne

Re: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Larry Grover
http://gnosis.cx/publish/programming/regular_expressions.html The "regex" man page (section 7) is also good. -- Larry Grover, PhD Assoc Prof of Physiology Marshall Univ Sch of Med On Tuesday 10 April 2001 15:10, Mitchell Henderson wrote: > hi > try searching google for regular expressions. >

Re: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Hidong Kim
I can't think of a script command right now. But if you open the file with vi, you can do this: :%s/"//g This will remove all ". Good luck, Hidong Dan B wrote: > > Can anyone give me a quick reference for building a script that removes all > quotes (" symbols) from a given file? > >

Re: Script (sed/perl) to remove all quotes (") from a file?

2001-04-10 Thread Mitchell Henderson
hi try searching google for regular expressions. On Tue, Apr 10, 2001 at 12:06:07PM -0700, Dan B wrote: > Can anyone give me a quick reference for building a script that removes all > quotes (" symbols) from a given file? > > I imagine a sed or perl script could do it. Is there any good free

Re: script to rename files?

2001-01-25 Thread Bret Hughes
Vineeta wrote: > ok.guys ,in my previous mail i just wanted to highlight the vi > command.and so put it in quotes. > What i was saying is: > vi aa dd and not vi "aa dd" > will open 2 files for edit > That's all. > Again quotes were not intended to be part of the commands i wrote.Only > to highli

Re: script to rename files?

2001-01-25 Thread Vineeta
ok.guys ,in my previous mail i just wanted to highlight the vi command.and so put it in quotes. What i was saying is: vi aa dd and not vi "aa dd" will open 2 files for edit That's all. Again quotes were not intended to be part of the commands i wrote.Only to highlight it. If it's lead to confusi

Re: script to rename files?

2001-01-25 Thread Charles Galpin
John, We have cleared up that you can have files with spaces (even just spaces :) ), and you have been given solutions to script the rename. However, I'm curious as to why these files are a "problem" in the first place? charles On Sat, 20 Jan 2001, John Aldrich wrote: > Anyone have a script o

Re: script to rename files?

2001-01-22 Thread Cameron Simpson
On Mon, Jan 22, 2001 at 12:09:19PM +0530, Vineeta <[EMAIL PROTECTED]> wrote: | But,if you are going to try something like vi "aa dd" where "aa dd" is the | filename,it will interpret it as 2 different files to be edited. Feh. vi "aa dd" works just fine. -- Cameron Simpson, DoD#743

Re: script to rename files?

2001-01-22 Thread Ashley M. Kirchner
Vineeta wrote: > I suppose you did not pay attention to what i wrote. > simply typing: > vi aa bb > > > Vineeta wrote: > > > > > > But,if you are going to try something like vi "aa dd" where "aa dd" is the > > > filename,it will interpret it as 2 different files to be edited. Reading your ow

Re: script to rename files?

2001-01-22 Thread Bret Hughes
Vineeta wrote: > I suppose you did not pay attention to what i wrote. > simply typing: > vi aa bb > will create 2 files > unless you put them in quotes. > What i wrote was precisely this. > Actually your example used the quotes Bret ___ Redhat-lis

Re: script to rename files?

2001-01-22 Thread John Aldrich
On Mon, 22 Jan 2001, you wrote: > First of all,unix does not permit spaces in filenames. > Are you trying to put your files from a windows m/c to unix?? > Lemme put it this way: the files I downloaded include spaces in their names. :-) And someone already posted a script to fix this. :-) Further,

Re: script to rename files?

2001-01-22 Thread Dave Ihnat
On Mon, Jan 22, 2001 at 12:09:19PM +0530, Vineeta wrote: > But,if you are going to try something like vi "aa dd" where "aa dd" is the > filename,it will interpret it as 2 different files to be edited. Uh...well...sorry, no. If you do exactly what you said: vi "foo bar" you will create

Re: script to rename files?

2001-01-21 Thread Vineeta
I suppose you did not pay attention to what i wrote. simply typing: vi aa bb will create 2 files unless you put them in quotes. What i wrote was precisely this. Vineeta Micah Yoder wrote: > Vineeta wrote: > > > > But,if you are going to try something like vi "aa dd" where "aa dd" is the > > fi

Re: script to rename files?

2001-01-21 Thread Micah Yoder
Vineeta wrote: > > But,if you are going to try something like vi "aa dd" where "aa dd" is the > filename,it will interpret it as 2 different files to be edited. nope. I just did a kwrite "test file" and vi "test file" and both created a file called "test file" without quotes and with the sp

Re: script to rename files?

2001-01-21 Thread Vineeta
But,if you are going to try something like vi "aa dd" where "aa dd" is the filename,it will interpret it as 2 different files to be edited. You can have space between filenames only if you use a little bit of scripting,stuff like ,if you say put a file from windows to unix named "aa bb.txt".It re

Re: script to rename files?

2001-01-21 Thread Dave Ihnat
On Mon, Jan 22, 2001 at 11:50:53AM +0530, Vineeta wrote: > First of all,unix does not permit spaces in filenames. Uh...I guess I'll be the first to get to say, this is Not True. Very, very Not True. Unix (and by extension Linux) not only have always allowed spaces (although many of the tools ar

Re: script to rename files?

2001-01-21 Thread Vineeta
First of all,unix does not permit spaces in filenames. Are you trying to put your files from a windows m/c to unix?? Vineeta John Aldrich wrote: > Anyone have a script or util that'll rename files with > spaces in 'em such that spaces become underscores? It's a > real bear when you have several

re: script to rename files?

2001-01-21 Thread Ed Alexander
John, Here's a short little script that will do only what you asked. It works within a single directory and, as written, will not descend a directory tree. It will replace one space or consecutive spaces in a file name with a single underscore. As you can see, you must supply the directory nam

Re: script to rename files?

2001-01-20 Thread Matthew Melvin
On Sat, 20 Jan 2001 at 10:14pm (-0500), John Aldrich wrote: > Anyone have a script or util that'll rename files with > spaces in 'em such that spaces become underscores? It's a > real bear when you have several HUNDRED files :-) > John > #!/usr/bin/perl # GLOBALS ##

re: script to rename files?

2001-01-20 Thread John Aldrich
On Sat, 20 Jan 2001, Ed Alexander wrote: > There was an article in "Server/Workstation Expert" > magazine last October which explained in detail how > to do exactly what you're asking. Get the file: > > http://swexpert.com/C2/SE.C2.OCT.00.pdf > Ed... I know you're probably working on the old "

re: script to rename files?

2001-01-20 Thread John Aldrich
On Sat, 20 Jan 2001, Ed Alexander wrote: > There was an article in "Server/Workstation Expert" > magazine last October which explained in detail how > to do exactly what you're asking. Get the file: > > http://swexpert.com/C2/SE.C2.OCT.00.pdf > Thanks...:-) it'll save me a TON of time and trou

re: script to rename files?

2001-01-20 Thread Ed Alexander
There was an article in "Server/Workstation Expert" magazine last October which explained in detail how to do exactly what you're asking. Get the file: http://swexpert.com/C2/SE.C2.OCT.00.pdf HTH. Cheers, Ed On Sat, 20 Jan 2001, John Aldrich wrote: > >Anyone have a script or util that'll ren

Re: Script Debugger

2000-07-04 Thread Steven W. Orr
There is one thing you can do. Assuming you you are running a bash script, you can change the shebang to add the -xv switches. Then you can set export PS4='+${0##*/} line $LINENO: ' It's just like a debugger :-) -- -Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED] -Strang

Re: Script help? [OT?]

2000-04-20 Thread Gordon Messmer
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

Re: Script help? [OT?]

2000-04-16 Thread Don Knott
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

Re: script

2000-03-23 Thread Chris Dowling
On Thu, 23 Mar 2000, Steve Lee wrote: > what does it mean when you type this. > > find . -name *_ -exec ~/oiuncomp {} \; find in all directories under this directory (including in this directory) (.) all files that have names that END with _ (-name \*_), and for each file found, run the comma

Re: Script for checking ppp connection

2000-03-21 Thread Robert Canary
A simpler more integrated way would be to include the persist option in your /etc/ppp/options. (see the ppp man) "Anthony E. Greene" wrote: > At 21:58 2000-03-20 -0700, Adahma wrote: > >I messed with a script for a while, and then found that wvdial was > >my easiest solution. No script req'd si

Re: Script for checking ppp connection

2000-03-21 Thread Anthony E. Greene
At 21:58 2000-03-20 -0700, Adahma wrote: >I messed with a script for a while, and then found that wvdial was >my easiest solution. No script req'd since it automagically redials >when disconnected. I don't call it from a cron, but that should not >be a problem I wouldn't think. I'm not sure how

Re: Script for checking ppp connection

2000-03-20 Thread Mozilla
Adahma wrote: > > On Mon, Mar 20, 2000 at 03:52:51PM -0600, Stephen Hargrove wrote: > > Stephen M Lavelle wrote: > > > > > > i have a cron job which dials up isp at 8am each morning. > > > I need a small script which can check (periodically) if the link is > > > still up and if it is not then red

Re: Script for checking ppp connection

2000-03-20 Thread Adahma
On Mon, Mar 20, 2000 at 03:52:51PM -0600, Stephen Hargrove wrote: > Stephen M Lavelle wrote: > > > > i have a cron job which dials up isp at 8am each morning. > > I need a small script which can check (periodically) if the link is > > still up and if it is not then redial and reconnect. > > Any po

Re: Script for checking ppp connection

2000-03-20 Thread Anthony E. Greene
Stephen M Lavelle wrote: > > i have a cron job which dials up isp at 8am each morning. > I need a small script which can check (periodically) if the link is > still up and if it is not then redial and reconnect. > Any pointers/examples please? Run this using cron: !#/bin/sh if [ `/sbin/route -n

Re: Script for checking ppp connection

2000-03-20 Thread Edward Dekkers
FOR THE TWO STEPHENS! Use the following function in your script: pppisup(){ [ "`/sbin/route -n|/bin/grep -E '^0.0.0.0.*ppp'`" ] pppisup holds true if the link is up. Easy eh? Pilfered it from someone's domail script. Edward Dekkers (Director) Triple D Computer Services Pty. Ltd. Western Aus

Re: Script for checking ppp connection

2000-03-20 Thread Hal Burgiss
On Tue, Mar 21, 2000 at 08:53:49AM +1100, Stephen M Lavelle wrote: > i have a cron job which dials up isp at 8am each morning. > I need a small script which can check (periodically) if the link is > still up and if it is not then redial and reconnect. > Any pointers/examples please? > Regards, > S

Re: Script for checking ppp connection

2000-03-20 Thread Dave Ihnat
Stephen M Lavelle wrote: > i have a cron job which dials up isp at 8am each morning. > I need a small script which can check (periodically) if the link is > still up and if it is not then redial and reconnect. > Any pointers/examples please? Well, I've written a script that runs multiple Seti cl

Re: Script for checking ppp connection

2000-03-20 Thread Stephen Hargrove
Stephen M Lavelle wrote: > > i have a cron job which dials up isp at 8am each morning. > I need a small script which can check (periodically) if the link is > still up and if it is not then redial and reconnect. > Any pointers/examples please? > Regards, > Steve > PS. I am not interested in using

Re: script

2000-03-10 Thread Steve Lee
Thanks Charles. You are always helpful to me when ever i post a message. Thanks Again. Charles Galpin wrote: > perl -pi.bak -e 's/(\d+),(\d+)\.(\d{2})/$1$2\.$3/g' yourfile > > the old file will be renamed yourfile.bak > > hth > charles > > On Thu, 9 Mar 2000, Steve Lee wrote: > > > can someone h

Re: script

2000-03-10 Thread Pete Peterson
Hi Steve, It would be helpful if you would be a bit more specific about what you're trying to do. I'm having trouble interpreting your question. Do you mean to: * delete entire lines if they contain "8,000.00" or "9,000.00" anywhere egrep -v '[89],000\.00' infile >outfile * delete

Re: script

2000-03-10 Thread Charles Galpin
perl -pi.bak -e 's/(\d+),(\d+)\.(\d{2})/$1$2\.$3/g' yourfile the old file will be renamed yourfile.bak hth charles On Thu, 9 Mar 2000, Steve Lee wrote: > can someone help me write > a script to remove , out of a file > lines of data with price that has > > 9,000.00 > 8,000.00 > > > etc >

Re: script

2000-03-09 Thread Nico De Ranter
On Thu, 9 Mar 2000, Steve Lee wrote: > can someone help me write > a script to remove , out of a file > lines of data with price that has > > 9,000.00 > 8,000.00 grep -v "9,000\.00" thefile.txt | grep -v "8,000\.00" should do the trick. Nico > > > etc > > about 710 line of these with t

Re: script to buld add user accounts

1999-12-29 Thread Anthony E. Greene
Chuck Mead wrote: > > On Tue, 28 Dec 1999, [EMAIL PROTECTED] said: > > >I run a small mail server for some schools that cannot afford their own and > >from time to time I get a list of new users who need accounts. I would like > >to automate this as much as possible on my box running RH 6.1. >

RE: script to build add user accounts

1999-12-29 Thread Ward William E PHDN
Try something like this (untested) cat | awk '{printf("-p %s %s\n",$2,$1)}' | xargs useradd or you could try this: cat | awk '{printf("useradd -M -p %s %s\n",$2,$1)}' > myfile chmod 777 myfile myfile HTH, HAND Bill Ward -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROT

Re: Re: script to buld add user accounts

1999-12-29 Thread manux
you may use expect to enter the passwords try man expect manux >> On Tue, 28 Dec 1999, [EMAIL PROTECTED] said: >> >> >I run a small mail server for some schools that cannot afford their own and >> >from time to time I get a list of new users who need accounts. I would like >> >to automate th

Re: script to buld add user accounts

1999-12-28 Thread tom minchin
> On Tue, 28 Dec 1999, [EMAIL PROTECTED] said: > > >I run a small mail server for some schools that cannot afford their own and > >from time to time I get a list of new users who need accounts. I would like > >to automate this as much as possible on my box running RH 6.1. > > > >I was wonderin

Re: script to buld add user accounts

1999-12-28 Thread Chuck Mead
On Tue, 28 Dec 1999, [EMAIL PROTECTED] said: >I run a small mail server for some schools that cannot afford their own and >from time to time I get a list of new users who need accounts. I would like >to automate this as much as possible on my box running RH 6.1. > >I was wondering if anyone kn

RE: script

1999-12-13 Thread Charles Galpin
yes, you are correct. I thought I'd apologized already, but obviously not profusely enough. I was thinking of psoix regex, and didn't test before opening my mouth and inserting my foot. again, sorry for the misinformation, and thank you for pointing it oot. charles On Mon, 13 Dec 1999, Ward Will

RE: script

1999-12-13 Thread Ward William E PHDN
: Friday, December 10, 1999 8:29 PM To: [EMAIL PROTECTED] Cc: recipient.list.not.shown; @nswcphdn.navy.mil Subject: Re: script actually, the '.' will match any character. So it will also match dead_letters, dead-letters, deadaleters etc. hth charles On Fri, 10 Dec 1999, Vidiot wrote: >

Re: [RedHat-List] Re: script

1999-12-11 Thread Charles Galpin
oops. my bad. You are absolutely correct. charles On Sun, 12 Dec 1999, Cameron Simpson wrote: > On Fri, Dec 10, 1999 at 08:29:10PM -0500, Charles Galpin wrote: > | actually, the '.' will match any character. So it will also match > | dead_letters, dead-letters, deadaleters etc. > [...] > | On F

Re: [RedHat-List] Re: script

1999-12-11 Thread Cameron Simpson
On Fri, Dec 10, 1999 at 08:29:10PM -0500, Charles Galpin wrote: | actually, the '.' will match any character. So it will also match | dead_letters, dead-letters, deadaleters etc. [...] | On Fri, 10 Dec 1999, Vidiot wrote: | > >find / -name "dead.letters" -exec rm {} /; Um, no. RTFM, my man. This

Re: script

1999-12-11 Thread Steven W. Orr
Please try this approach instead: find / -iname dead.letters | xargs rm The difference is that the minimal number of rm commands will be executed to get the job done. The -exec will cause one process for every file that matches. Not a big deal if there are only a few files, but it can be a very

Re: script

1999-12-10 Thread Jasper Jans
Saturday, December 11, 1999 2:29 AM Subject: Re: script | actually, the '.' will match any character. So it will also match | dead_letters, dead-letters, deadaleters etc. | | hth charles | | On Fri, 10 Dec 1999, Vidiot wrote: | | > >find / -name "dead.letters" -exec rm {}

Re: script

1999-12-10 Thread Charles Galpin
actually, the '.' will match any character. So it will also match dead_letters, dead-letters, deadaleters etc. hth charles On Fri, 10 Dec 1999, Vidiot wrote: > >find / -name "dead.letters" -exec rm {} /; > > > >Note, all of that has to be there. > >HTH, HAND > >Bill Ward > > The double-quotes

RE: script

1999-12-10 Thread Ward William E PHDN
but I try to always be VERY explicit about what I want to do if I'm running as root. Bill Ward -Original Message- From: Vidiot [mailto:[EMAIL PROTECTED]] Sent: Friday, December 10, 1999 4:36 PM To: [EMAIL PROTECTED] Cc: recipient.list.not.shown; @nswcphdn.navy.mil Subject: Re: scri

Re: script

1999-12-10 Thread Vidiot
>find / -name "dead.letters" -exec rm {} /; > >Note, all of that has to be there. >HTH, HAND >Bill Ward The double-quotes are not necessary as there are no embedded special characters or spaces. MB -- e-mail: [EMAIL PROTECTED] [Where do you think Microsoft would be today if they waited]

RE: script

1999-12-10 Thread Ward William E PHDN
find / -name "dead.letters" -exec rm {} /; Note, all of that has to be there. HTH, HAND Bill Ward -Original Message- From: Steve Lee [mailto:[EMAIL PROTECTED]] Sent: Friday, December 10, 1999 2:43 PM To: RedHat Maillist Cc: recipient.list.not.shown; @nswcphdn.navy.mil Subject: script I

Re: script

1999-12-10 Thread Vidiot
>I'm no programmer. >can somoone show me a quick >script that would run through >the whole system to remove >dead.letters off the system. No script needed, simple command: find / -iname dead.letters -exec rm {} \; MB -- e-mail: [EMAIL PROTECTED] [Where do you think Microsoft would be t

Re: script

1999-12-10 Thread Jasper Jans
Put this in a file: #!/bin/sh find / -type f -name dead.letter -print -exec rm {} \; Make it executable (chmod 700) and run that (from cron) J. | - Original Message - | From: "Steve Lee" <[EMAIL PROTECTED]> | To: "RedHat Maillist" <[EMAIL PROTECTED]> | Sent: Friday, December 1

Re: script

1999-12-10 Thread Jasper Jans
#!/bin/sh find / -type f -name dead.letter -print -exec rm {} \; Put the above in a file and make it executable (chmod 700) and run that J. - Original Message - From: "Steve Lee" <[EMAIL PROTECTED]> To: "RedHat Maillist" <[EMAIL PROTECTED]> Sent: Friday, December 10, 1999 8:43 PM Sub

Re: OT: Perl flexing (was: Re: script)

1999-12-03 Thread Charles Galpin
> > Surely someone can beat 9 bytes.. Anyone? Anyone? Beuller? Wait! I can! > > #!/usr/bin/perl -pi.bak > y/\t/|/; > > That's 8 bytes. :-P ok, Beuller here :). try 7 y/\t/|/ The ';' can be excluded if it's a one liner. But who's counting. > : all conversion is done inplace .. thanks to

  1   2   >