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

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 script I can look at $0 to find the na

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 like a b

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