Re: scripting help with ftp

2003-08-27 Thread Ronald W. Heiby
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 C-Kermit (for Linux) and Kermit-95 (for your Windows box) have tremendous scripting capabilities. There is a modest cost for the Kermit-95 distribution, but I have found it to be well worth it. Check it out at . Ron.

Re: scripting help with ftp

2003-08-26 Thread rick henderson
On Tue, 2003-08-26 at 00:13, Peram's List wrote: > Hi Gurus, > I need help with a script to transfer files from a linux box running RH > 8.0 from a windows 2000 box.The sequence is as follows: > 1. Ftp into the windows server, check for the existance of map* files in > ftp dir, if yes move the fil

Re: scripting help with ftp

2003-08-26 Thread Gerry Doris
On Tue, 26 Aug 2003, Peram's List wrote: > Hi Gurus, > I need help with a script to transfer files from a linux box running RH > 8.0 from a windows 2000 box.The sequence is as follows: > 1. Ftp into the windows server, check for the existance of map* files in > ftp dir, if yes move the files to t

Re: Scripting help

2003-08-22 Thread Cameron Simpson
I wrote: | > start=`perl -e 'print time'` | > body of script here ... | > end=`perl -e 'print time'` | > echo "took `expr $end - $start` seconds" Whoops - left off the quote around "print time" in the second perl. On 18:18 21 Aug 2003, Bret Hughes <[EMAIL PROTECTED]> wrote: |

RE: Scripting help

2003-08-21 Thread Jason Dixon
On Thu, 2003-08-21 at 20:24, Cowles, Steve wrote: > Jason Dixon wrote: > > On Thu, 2003-08-21 at 17:38, Peram's List wrote: > >> I appreciate your quick response. > >> Is there any way I get the time taken for the execution of a script > >> from the script itself instead of typing it at the command

RE: Scripting help

2003-08-21 Thread Cowles, Steve
Jason Dixon wrote: > On Thu, 2003-08-21 at 17:38, Peram's List wrote: >> I appreciate your quick response. >> Is there any way I get the time taken for the execution of a script >> from the script itself instead of typing it at the command line. > > To be honest, I can't get GNU time to even honor

Re: Scripting help

2003-08-21 Thread Jason Dixon
On Thu, 2003-08-21 at 17:38, Peram's List wrote: > I appreciate your quick response. > Is there any way I get the time taken for the execution of a script from > the script itself instead of typing it at the command line. To be honest, I can't get GNU time to even honor its own flags. It's also n

Re: Scripting help

2003-08-21 Thread Bret Hughes
On Thu, 2003-08-21 at 17:46, Cameron Simpson wrote: > On 16:38 21 Aug 2003, Peram's List <[EMAIL PROTECTED]> wrote: > | I appreciate your quick response. > | Is there any way I get the time taken for the execution of a script from > | the script itself instead of typing it at the command line. > >

Re: Scripting help

2003-08-21 Thread Cameron Simpson
On 16:38 21 Aug 2003, Peram's List <[EMAIL PROTECTED]> wrote: | I appreciate your quick response. | Is there any way I get the time taken for the execution of a script from | the script itself instead of typing it at the command line. Well, if you're still inside the script then the won't be "the

Re: Scripting help

2003-08-21 Thread Peram's List
IL PROTECTED]> Sent: Thursday, August 21, 2003 3:41 PM Subject: Re: Scripting help > On Thu, 2003-08-21 at 16:40, Peram's List wrote: > > Hi, > > I know this is a basic question but I tried on the web and could not > > find an answer. > > I'd appreciate if

Re: Scripting help

2003-08-21 Thread Jason Dixon
On Thu, 2003-08-21 at 16:40, Peram's List wrote: > Hi, > I know this is a basic question but I tried on the web and could not > find an answer. > I'd appreciate if you can guide me on how I can find the time taken for > a script to complete on Redhat 8.0. time Example: $ time sleep 3 real0

Re: Scripting help

2003-03-29 Thread Edward Dekkers
> The Linux Documentation Project has pretty good stuff: > > Advanced Bash-Scripting Guide > http://www.tldp.org/LDP/abs/html/ > > Tony Thanks Tony. Regards, --- Edward Dekkers (Director) Triple D Computer Services P/L -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] ht

Re: Scripting help

2003-03-29 Thread Edward Dekkers
> And there are loads of online tutorials on shell scripting. Google turned up > one such > tutorial for me: > > http://www.freeos.com/guides/lsst/ > > There must be others too. > > -- > Anand Thanks Anand - the stuff you just told me should in fact get me by. When I get more time on my hands (th

Re: Scripting help

2003-03-29 Thread Anthony E. Greene
On 29-Mar-2003/18:14 +0800, Edward Dekkers <[EMAIL PROTECTED]> wrote: >The commands, I have no problem with at all, but I'd like to build some >'smarts' into the sequence. > [snip] > >Anyone know of a good tutorial on the web to help me learn these few >things? The Linux Documentation Project has

Re: Scripting help

2003-03-29 Thread Anand Buddhdev
[cut] > But things like checking for zip return error codes, mounting the share > error codes etc. is new to me. Obviously if the share is unable to be > mounted, I'd like to skip the rest of the steps and echo "Backup PC could > not be mounted - error code >> backuplog.txt". And then drop > out.

Re: Scripting help

2003-02-13 Thread Darryl Harvey
And the one I like and use is; http://www.amazon.com/exec/obidos/ASIN/0130147117/qid=1045182968/sr=2-1/ref=sr_2_1/103-8867147-8196623 It's a winner Darryl At 04:17 PM 13/02/2003 -0800, you wrote: hi arden, gordon, et al, i tried out several shell books (including o'reilly), but the one i

Re: Scripting help

2003-02-13 Thread Jeff Stern
hi arden, gordon, et al, i tried out several shell books (including o'reilly), but the one i kept and keep using is below. chock full of examples (for bash) and task-oriented -- i.e., "how to do x" (and an example).. "how to do y" (and another example) etc etc. in fact, i have to keep stealing

Re: Scripting help

2003-02-13 Thread Jeff Bearer
You can sign up for O'reilly's safari for free for 15 days, they have the bash book on there, I've been using it and it's a great guide. On Wed, 2003-02-12 at 17:09, Todd A. Jacobs wrote: > On Wed, 12 Feb 2003, Arden Norder wrote: > > > Can anyone help me with a book title for Unix/Linux Scriptin

Re: Scripting help

2003-02-13 Thread Jan
Jon Haugsand wrote: You can, in our situation do something like: while read a b c d; do case "$a" in root) export R="ok" ;; daemon) export D="ok" ;; esac done < /etc/passwd And your "side effects" remain. (But I buy the point of portable scripting anyway.) Ah, y

Re: Scripting help

2003-02-13 Thread Jon Haugsand
* [EMAIL PROTECTED] > > NAME=`IFS=':' > > cat /etc/passwd | while read a b c d; do > > if [[ "$a" == "root" ]]; then > > echo $c > > fi > > done` > > > That's a good tip - thank you! However, that only works if we're > talking about 1 env variable. In my work it was actually a number

Re: Scripting help

2003-02-13 Thread Jan
Jon Haugsand wrote: * [EMAIL PROTECTED] IFS=':' cat /etc/passwd | while read a b c d do if [[ "$a" == "root" ]] then export NAME="$c" fi done - in ksh this will export NAME into your current env, but not in bash. The explanation, I understand, is that when you start a pipeline in

Re: Scripting help

2003-02-13 Thread Jon Haugsand
* [EMAIL PROTECTED] > > IFS=':' > cat /etc/passwd | while read a b c d > do > if [[ "$a" == "root" ]] > then >export NAME="$c" > fi > done > > - in ksh this will export NAME into your current env, but not in > bash. The explanation, I understand, is that when you start a pipel

Re: Scripting help

2003-02-13 Thread Jan
James Francis wrote: Arden Norder wrote: Hey folks!! Can anyone help me with a book title for Unix/Linux Scripting?? I used to (back in the DOS days) do alot of batch scripting using variables etc, etc, etc. I would like to try to automate some processes on my RH7.2 Server via unix batch scrip

Re: Scripting help

2003-02-12 Thread Gordon Ewasiuk
On Wed, 12 Feb 2003, Arden Norder wrote: > Hey folks!! > Can anyone help me with a book title for Unix/Linux Scripting?? > > I used to (back in the DOS days) do alot of batch scripting using variables etc, >etc, etc. > > I would like to try to automate some processes on my RH7.2 Server via unix

Re: Scripting help

2003-02-12 Thread Andrew Robinson
With a little web-searching, you should be able to find a ton of tutorials on shell scripting. If you liked DOS scripting, you'll be amazed at what you can do with one of the *nix shells. At 01:56 PM 2/12/2003 -0800, you wrote: O'Reilly makes a good book about Bash, see their site. /B - Or

Re: Scripting help

2003-02-12 Thread Anthony E. Greene
Arden Norder wrote: Can anyone help me with a book title for Unix/Linux Scripting?? I used to (back in the DOS days) do alot of batch scripting using variables etc, etc, etc. I would like to try to automate some processes on my RH7.2 Server via unix batch scripting. Also see the Advanced Bash

Re: Scripting help

2003-02-12 Thread Todd A. Jacobs
On Wed, 12 Feb 2003, Arden Norder wrote: > Can anyone help me with a book title for Unix/Linux Scripting?? The O'Reilly bash book is probably the best book for learning Linux shell scripting. While you can certainly use other shells or scripting languages, bash is the default shell on nearly all

Re: Scripting help

2003-02-12 Thread David Busby
O'Reilly makes a good book about Bash, see their site. /B - Original Message - From: "Arden Norder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 12, 2003 13:51 Subject: Scripting help > Hey folks!! > Can anyone help me with a book title for Unix/Linux Scripting??

RE: Scripting help

2003-02-12 Thread James Francis
Arden Norder wrote: > Hey folks!! > Can anyone help me with a book title for Unix/Linux Scripting?? > > I used to (back in the DOS days) do alot of batch scripting > using variables etc, etc, etc. > > I would like to try to automate some processes on my RH7.2 > Server via unix batch scripting. >

Re: Scripting help

2003-02-12 Thread jkinz
On Wed, Feb 12, 2003 at 10:51:03PM +0100, Arden Norder wrote: > Hey folks!! > Can anyone help me with a book title for Unix/Linux Scripting?? > > I used to (back in the DOS days) do alot of batch scripting using variables etc, >etc, etc. > > I would like to try to automate some processes on my

Re: Scripting help needed

2001-01-29 Thread Cameron Simpson
I wrote: | Note that a stay packet can bring up the link, [...] s/stay/stray/ Doh! -- Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/ "Yeh, Buddy.. I've got your COMPUTER! Right HERE!!" (computer THIS!) - Larry Cunningham, [EMAIL PROTECTED] ___

Re: Scripting help needed

2001-01-29 Thread Cameron Simpson
| > Also worth remembering is that ppp has an "on demand" mode. You have | > ppp in this mode at boot and it doesn't start the modem, just sets | > routes. When you try to send data over the link it starts the modem. | > Which means you can pretend it's up and let ppp do the dial-out bit | > itsel

Re: Scripting help needed

2001-01-29 Thread Merell L. Matlock, Jr.
* Cameron Simpson ([EMAIL PROTECTED]) [010127 19:08]: > Also worth remembering is that ppp has an "on demand" mode. You have > ppp in this mode at boot and it doesn't start the modem, just sets > routes. When you try to send data over the link it starts the modem. > Which means you can pretend it

Re: Scripting help needed

2001-01-29 Thread Justin Zygmont
another trick is the files in /var/ru. On Mon, 29 Jan 2001, Thierry ITTY wrote: > ifconfig tells you whether your ppp connection is active or not. then it's > up to you to connect conditionnally > > # my app > ifconfig | grep "ppp0" || start_ppp_script > start app X > > > or something like t

Re: Scripting help needed

2001-01-29 Thread Thierry ITTY
ifconfig tells you whether your ppp connection is active or not. then it's up to you to connect conditionnally # my app ifconfig | grep "ppp0" || start_ppp_script start app X or something like that A 14:11 27/01/2001 -0500, vous avez écrit : >Howdy folks, > >Can someone help to pull the wool

Re: Scripting help needed

2001-01-28 Thread Edward Dekkers
> I cna get the 'not active' part to work, but just can't figure out how > to detect if ppp0 is up and running. > > Any hints/pointers will be most appreciated. > > Thanks, > > Merell Hi Merrell, I see you have allready some answers but I use this: pppisup(){ [ "`/sbin/route -n|/bin/grep -E

Re: Scripting help needed

2001-01-27 Thread Cameron Simpson
On Sat, Jan 27, 2001 at 02:44:44PM -0500, rpjday <[EMAIL PROTECTED]> wrote: | On Sat, 27 Jan 2001, Merell L. Matlock, Jr. wrote: | > X needs to run if my dial-up connection is active, but if the dial-up | > is *not* active, it needs to dialup, run then disconnect. | > I cna get the 'not active' pa

Re: Scripting help needed

2001-01-27 Thread Cameron Simpson
On Sat, Jan 27, 2001 at 01:27:36PM -0800, Brad Doster <[EMAIL PROTECTED]> wrote: | Is there a known host address that you can only ping thru the ppp interface? | If so, you might script a ping test, then let X act based on the result | code. Something like this might work: | | #Wait for 4

RE: Scripting help needed

2001-01-27 Thread Brad Doster
Is there a known host address that you can only ping thru the ppp interface? If so, you might script a ping test, then let X act based on the result code. Something like this might work: #Wait for 4 'echo reply's or 10 seconds, whichever is greater #NOTE: -w does not work under k

Re: Scripting help needed

2001-01-27 Thread rpjday
On Sat, 27 Jan 2001, Merell L. Matlock, Jr. wrote: > Howdy folks, > > Can someone help to pull the wool out of my eyes? > > I need to do a job called 'X'. > > X needs to run if my dial-up connection is active, but if the dial-up > is *not* active, it needs to dialup, run then disconnect. > > I cn

Re: scripting help / question

2000-11-14 Thread Michael R. Jinks
arco Shaw [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 14, 2000 12:32 AM > To: [EMAIL PROTECTED] > Subject: Re: scripting help / question > > You might have to be more specific on your goal. find with -exec will be > able to do certain things on files, and a for loop will

RE: scripting help / question

2000-11-14 Thread Stephen_Reilly
ls -la s* | awk '{print $9}' | sed "s/^./grep -i \'&/g" | sed "s/$/\' file/g" > srcipt.sh is really evil looking steve -Original Message- From: Marco Shaw [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 14, 2000 12:32 AM To: [EMAIL PR

Re: scripting help / question

2000-11-13 Thread Ed Lazor
At 08:31 PM 11/13/2000 -0400, you wrote: >You might have to be more specific on your goal. find with -exec will be >able to do certain things on files, and a for loop will also be able do >things to a list. > >Marco k, here goes: - first program creates a bunch of output like this ##

Re: scripting help / question

2000-11-13 Thread Cameron Simpson
On Mon, Nov 13, 2000 at 04:32:53PM -0800, Ed Lazor wrote: | How can I take output from an awk command and run a command on each line? | | For example: | | ls -la s* | awk '{print $9}' | | would create several lines of output and I'd like to do something like grep | the lines from a file. The

Re: scripting help / question

2000-11-13 Thread Marco Shaw
You might have to be more specific on your goal. find with -exec will be able to do certain things on files, and a for loop will also be able do things to a list. Marco - Original Message - From: "Ed Lazor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 13, 2000 8:32