Re: Bash question

2002-11-11 Thread Robert P. J. Day
On Mon, 11 Nov 2002, Michael Schwendt wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Mon, 11 Nov 2002 08:55:41 +0100, Ronald Hermans wrote: > > > I wrote a little script to change to an other directory: > > > > #!/bin/bash > > cd /home/ronald/scripts > > clear > >

Re: Bash question

2002-11-11 Thread Michael Schwendt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 11 Nov 2002 08:55:41 +0100, Ronald Hermans wrote: > I wrote a little script to change to an other directory: > > #!/bin/bash > cd /home/ronald/scripts > clear > ls -l *.sh > > Everything goes allright except the fact

RE: Bash question

2002-11-11 Thread Babu, Sreedhar (CAP, GCF, Satyam, Consultant)
Title: RE: Bash question Ur script is executed in a new child bash shell. And the child exits as the script ends. Execute it like this (with out double quotes) ". Yourscript" -Original Message- From: Ronald Hermans [mailto:[EMAIL PROTECTED]] Sent: Monday, November 11, 200

Bash question

2002-11-10 Thread Ronald Hermans
Hi there, I wrote a little script to change to an other directory: #!/bin/bash cd /home/ronald/scripts clear ls -l *.sh Everything goes allright except the fact that when the script is ended I'm still in /home/ronald and not in /home/ronald/scripts The scripts fol

Re: SSH ? (probably a BASH question)

2000-05-04 Thread Cameron Simpson
On Thu, May 04, 2000 at 03:45:06PM -0700, Sam Bayne wrote: | > Only that you should contact Mike Lewis, not me. It was his question... | Oops. How is it that your message escaped getting the reply-to: field | set | to the list, like all the other messages I have subsequently checked? Because I se

Re: SSH ? (probably a BASH question)

2000-05-04 Thread Sam Bayne
Cameron Simpson wrote: > > On Thu, May 04, 2000 at 10:18:34AM -0700, Sam Bayne wrote: > | All this bash help aside, (And I missed the beginning of the thread, so > | maybe this was discussed), but is there a reason you don't just use > | .shosts authentication? It will prevent host spoofing and s

RE: SSH ? (probably a BASH question)

2000-05-04 Thread Mike Lewis
ilto:[EMAIL PROTECTED]] > Sent: Wednesday, May 03, 2000 7:04 AM > To: Cameron Simpson > Cc: [EMAIL PROTECTED] > Subject: Re: SSH ? (probably a BASH question) > > > On Wed, May 03, 2000 at 08:09:13PM +1000, Cameron Simpson wrote: > > On Wed, May 03, 2000 at 01:40:33AM -0700, M

Re: SSH ? (probably a BASH question)

2000-05-03 Thread Michael H. Warfield
On Thu, May 04, 2000 at 12:26:17PM +1000, Cameron Simpson wrote: > On Wed, May 03, 2000 at 10:03:30AM -0400, Michael H. Warfield wrote: > | On Wed, May 03, 2000 at 08:09:13PM +1000, Cameron Simpson wrote: > | > On Wed, May 03, 2000 at 01:40:33AM -0700, Mike Lewis wrote: > | > | Trying to setup pas

Re: SSH ? (probably a BASH question)

2000-05-03 Thread Cameron Simpson
On Wed, May 03, 2000 at 10:03:30AM -0400, Michael H. Warfield wrote: | On Wed, May 03, 2000 at 08:09:13PM +1000, Cameron Simpson wrote: | > On Wed, May 03, 2000 at 01:40:33AM -0700, Mike Lewis wrote: | > | Trying to setup passwordless login using rsync and ssh. | > | Suppose you have hostname1 tha

Re: SSH ? (probably a BASH question)

2000-05-03 Thread Michael H. Warfield
On Wed, May 03, 2000 at 08:09:13PM +1000, Cameron Simpson wrote: > On Wed, May 03, 2000 at 01:40:33AM -0700, Mike Lewis wrote: > | Trying to setup passwordless login using rsync and ssh. > | > | Suppose you have hostname1 that multiple machines will be connecting to > | using rsync / ssh. When s

Re: SSH ? (probably a BASH question)

2000-05-03 Thread Cameron Simpson
On Wed, May 03, 2000 at 01:40:33AM -0700, Mike Lewis wrote: | Trying to setup passwordless login using rsync and ssh. | | Suppose you have hostname1 that multiple machines will be connecting to | using rsync / ssh. When setting up the first machine (hostname2) to have a | passwordless login you

Re: SSH ? (probably a BASH question)

2000-05-03 Thread Todd A. Jacobs
On Wed, 3 May 2000, Mike Lewis wrote: > Suppose you have hostname1 that multiple machines will be connecting to > using rsync / ssh. When setting up the first machine (hostname2) to have a > passwordless login you would use: > > scp identity.pub user@hostname1:/home/username/.ssh/authoriz

SSH ? (probably a BASH question)

2000-05-03 Thread Mike Lewis
Trying to setup passwordless login using rsync and ssh. Suppose you have hostname1 that multiple machines will be connecting to using rsync / ssh. When setting up the first machine (hostname2) to have a passwordless login you would use: scp identity.pub user@hostname1:/home/username/.s

Re: bash question

2000-04-22 Thread Gustav Schaffter
Thanks again to everyone for all the constructive answers received. Best regards Gustav Gustav Schaffter wrote: > > Hi, > > In a bash script I can look at $0 to find the name of the current script > file, but if it's started with a full path, I will find the full path > and filename in $0. >

RE: bash question

2000-04-22 Thread Joseph T. Tannenbaum
use like this: echo Usage: `basename $0` [options] > -Original Message- > From: Gustav Schaffter [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 21, 2000 12:42 PM > To: redhat-list (Mailing list) > Subject: bash question > > > Hi, > > In a bash scrip

Re: bash question

2000-04-22 Thread Steven W. Orr
As this is a bash question and not a Bourne shell question, I'd like to offer A Better Way. Instead of referring to $0, just use ${0##*/} Typically, the start of most bash or ksh scripts will say: prog=${0##*/} Then later on refer to ${prog} -- -Time flies like the wind. Fruit flies l

Re: bash question

2000-04-21 Thread Mikkel L. Ellertson
At 09:41 PM 4/21/00 +0200, you wrote: >Hi, > >In a bash script I can look at $0 to find the name of the current script >file, but if it's started with a full path, I will find the full path >and filename in $0. > >How can I find only the name of the script file even if it's started >with the full

bash question

2000-04-21 Thread Gustav Schaffter
Hi, In a bash script I can look at $0 to find the name of the current script file, but if it's started with a full path, I will find the full path and filename in $0. How can I find only the name of the script file even if it's started with the full path? Regards Gustav -- pgp = Pretty Good