Re: Bash commands

2005-10-19 Thread Rob Sims
On Sat, Oct 15, 2005 at 02:47:46PM -0700, Freddy Freeloader wrote: > $a is unset. What does: echo "$a" print? What does: set | grep -e ^PROMPT -e ^PS print? -- Rob > >>b=${a/23/BB} > >>echo "b = $b" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Co

Re: Bash commands

2005-10-19 Thread Jon Dowland
On Wed, Oct 19, 2005 at 02:48:23PM +0100, michael wrote: > and I guess you've already tried putting a trace on to see exactly > what's happening 159 lines, 149 of which are quoted! Please trim your quotes! -- Jon Dowland http://jon.dowland.name/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED]

Re: Bash commands

2005-10-19 Thread Jon Dowland
On Wed, Oct 19, 2005 at 05:01:50AM -0700, Freddy Freeloader wrote: > Now, I'll tell you again that the output in question is NOT the contents > of any one directory on my computer. Run the script with -x passed to bash: $ bash -x script It will print out each step it takes. -- Jon Dowland ht

Re: Bash commands

2005-10-19 Thread michael
On Wed, 2005-10-19 at 14:44 +0100, michael wrote: > On Wed, 2005-10-19 at 05:01 -0700, Freddy Freeloader wrote: > > michael wrote: > > > > >On Tue, 2005-10-18 at 15:49 -0700, Freddy Freeloader wrote: > > > > > > > > >>Thanks for answering. Sorry it's taken so long to answer. I've just > > >>b

Re: Bash commands

2005-10-19 Thread michael
On Wed, 2005-10-19 at 05:01 -0700, Freddy Freeloader wrote: > michael wrote: > > >On Tue, 2005-10-18 at 15:49 -0700, Freddy Freeloader wrote: > > > > > >>Thanks for answering. Sorry it's taken so long to answer. I've just > >>been too busy to get back to this. I've inserted my comments in li

Re: Bash commands

2005-10-19 Thread Freddy Freeloader
michael wrote: On Tue, 2005-10-18 at 15:49 -0700, Freddy Freeloader wrote: Thanks for answering. Sorry it's taken so long to answer. I've just been too busy to get back to this. I've inserted my comments in line. michael wrote: On Thu, 2005-10-13 at 08:18 -0700, Freddy Freeloade

Re: Bash commands

2005-10-19 Thread michael
On Tue, 2005-10-18 at 15:49 -0700, Freddy Freeloader wrote: > Thanks for answering. Sorry it's taken so long to answer. I've just > been too busy to get back to this. I've inserted my comments in line. > > michael wrote: > > >On Thu, 2005-10-13 at 08:18 -0700, Freddy Freeloader wrote: > >

Re: Bash commands

2005-10-18 Thread Freddy Freeloader
Thanks for answering. Sorry it's taken so long to answer. I've just been too busy to get back to this. I've inserted my comments in line. michael wrote: On Thu, 2005-10-13 at 08:18 -0700, Freddy Freeloader wrote: Hi all, I downloaded the Advanced Bash Scripting Guide the other day an

Re: Bash commands

2005-10-16 Thread michael
On Thu, 2005-10-13 at 08:18 -0700, Freddy Freeloader wrote: > Hi all, > > I downloaded the Advanced Bash Scripting Guide the other day an have > started to work my way through it. I'm fairly new to bash so I get more > than a little confused when the output I get is nothing similar to what > t

Re: Bash commands

2005-10-15 Thread Freddy Freeloader
$a is unset. Rob Sims wrote: On Thu, Oct 13, 2005 at 08:18:05AM -0700, Freddy Freeloader wrote: Hi all, I downloaded the Advanced Bash Scripting Guide the other day an have started to work my way through it. I'm fairly new to bash so I get more than a little confused when the output I

Re: Bash commands

2005-10-14 Thread Rob Sims
On Thu, Oct 13, 2005 at 08:18:05AM -0700, Freddy Freeloader wrote: > Hi all, > > I downloaded the Advanced Bash Scripting Guide the other day an have > started to work my way through it. I'm fairly new to bash so I get more > than a little confused when the output I get is nothing similar to wh

Re: Bash commands

2005-10-14 Thread Freddy Freeloader
I have created no aliases on my system at all. There is, however, an alias for "dn", but that seems to be a system created alias. The output from dn lists 25 directories that are found in my /home directory. Number 23 on that list is, interestingly enough, one of the directories that was l

Re: Bash commands

2005-10-14 Thread Mike McCarty
Freddy Freeloader wrote: Bill, No I have not aliased the echo command. Bill Marcum wrote: On Thu, Oct 13, 2005 at 08:18:05AM -0700, Freddy Freeloader wrote: Hi all, I downloaded the Advanced Bash Scripting Guide the other day an have started to work my way through it. I'm fairly new to

Re: Bash commands

2005-10-14 Thread Freddy Freeloader
Bill, No I have not aliased the echo command. Bill Marcum wrote: On Thu, Oct 13, 2005 at 08:18:05AM -0700, Freddy Freeloader wrote: Hi all, I downloaded the Advanced Bash Scripting Guide the other day an have started to work my way through it. I'm fairly new to bash so I get more tha

Re: Bash commands

2005-10-13 Thread Bill Marcum
On Thu, Oct 13, 2005 at 08:18:05AM -0700, Freddy Freeloader wrote: > Hi all, > > I downloaded the Advanced Bash Scripting Guide the other day an have > started to work my way through it. I'm fairly new to bash so I get more > than a little confused when the output I get is nothing similar to wh

Re: Bash commands

2005-10-13 Thread Freddy Freeloader
LOL. I knew immediately after I sent that not saying that "a" was unset was a mistake. Sorry. Stephen R Laniel wrote: On Thu, Oct 13, 2005 at 08:18:05AM -0700, Freddy Freeloader wrote: b=${a/23/BB} echo "b = $b" Now the ABS guide says that where I'm setting b it should be substitutin

Re: Bash commands

2005-10-13 Thread Stephen R Laniel
On Thu, Oct 13, 2005 at 08:18:05AM -0700, Freddy Freeloader wrote: > b=${a/23/BB} > > echo "b = $b" > > Now the ABS guide says that where I'm setting b it should be > substituting BB for 23. It also says that the output of 'echo "b - $b"' > should be: b = BB35 Well, it's taking whatever the v

Bash commands

2005-10-13 Thread Freddy Freeloader
Hi all, I downloaded the Advanced Bash Scripting Guide the other day an have started to work my way through it. I'm fairly new to bash so I get more than a little confused when the output I get is nothing similar to what the ABS Guide says it should be. Here is what has me confused at the

Re: Bash commands

2002-09-02 Thread Russell
Bob Proulx wrote: > > Russell <[EMAIL PROTECTED]> [2002-09-02 11:42:45 +1000]: > > Thanks for the tips. I'm getting better;) > > I've been making this backup script which > > is nearly complete: > > I am going to leave the full quoted script so that I can comment on > the parts I want to comment

Re: Bash commands

2002-09-02 Thread Bob Proulx
Russell <[EMAIL PROTECTED]> [2002-09-02 11:42:45 +1000]: > Thanks for the tips. I'm getting better;) > I've been making this backup script which > is nearly complete: I am going to leave the full quoted script so that I can comment on the parts I want to comment upon. (Normally I would trim more

Re: Bash commands

2002-09-01 Thread Russell
Bob Proulx wrote: > > Russell <[EMAIL PROTECTED]> [2002-09-01 15:40:58 +1000]: > > I might have gotten somewhere initially if i hadn't have > > used those square [] brackets. > > A couple of gratuitous comments concerning the scripting plus the > helpful comments which were posted. I can't help

Re: Bash commands

2002-09-01 Thread Bob Proulx
Russell <[EMAIL PROTECTED]> [2002-09-01 15:40:58 +1000]: > I might have gotten somewhere initially if i hadn't have > used those square [] brackets. A couple of gratuitous comments concerning the scripting plus the helpful comments which were posted. I can't help but to say something. I know, I

Re: Bash commands

2002-08-31 Thread Russell
Russell wrote: > > Allan Wind wrote: > > > > On 2002-09-01 14:25:53, Russell wrote: > > > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] ; then echo "yes" ; fi > > > > You need the put 'df ..' in back quotes (``) to get it executed, > > but usually the exist status ($?) of grep is used

Re: Bash commands

2002-08-31 Thread Russell
Allan Wind wrote: > > On 2002-09-01 14:25:53, Russell wrote: > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] ; then echo "yes" ; fi > > You need the put 'df ..' in back quotes (``) to get it executed, > but usually the exist status ($?) of grep is used to do this: > > df /mnt | grep

Re: Bash commands

2002-08-31 Thread Allan Wind
On 2002-09-01 00:52:19, Allan Wind wrote: > On 2002-09-01 14:25:53, Russell wrote: > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] ; then echo "yes" ; fi > > You need the put 'df ..' in back quotes (``) to get it executed, > but usually the exist status ($?) of grep is used to do this

Re: Bash commands

2002-08-31 Thread Allan Wind
On 2002-09-01 14:25:53, Russell wrote: > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] ; then echo "yes" ; fi You need the put 'df ..' in back quotes (``) to get it executed, but usually the exist status ($?) of grep is used to do this: df /mnt | grep -ie /dev/hdc1 > /dev/null; if [ $? -

Re: Bash commands

2002-08-31 Thread Russell
Martin Strauss wrote: > > Begin Russell quotation: > > Russell wrote: > > > > > > Hi, > > > > > > When i try a command like: > > > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] echo "yes" > > > > > > then after i press "return", i get a command prompt ">" which > > > seems to be wait

Re: Bash commands

2002-08-31 Thread Russell
Mark Zimmerman wrote: > > On Sun, Sep 01, 2002 at 02:25:53PM +1000, Russell wrote: > > Russell wrote: > > > > > > Hi, > > > > > > When i try a command like: > > > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] echo "yes" > > > > > > then after i press "return", i get a command prompt ">

Re: Bash commands

2002-08-31 Thread Martin Strauss
You need to enclose the whole statement after -n in quotes: if [ -n "`df /mnt | grep -ie /dev/hdc1`" ]; then echo yes; fi HTH Martin Begin Russell quotation: > Russell wrote: > > > > Hi, > > > > When i try a command like: > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] echo "ye

Re: Bash commands

2002-08-31 Thread Mark Zimmerman
On Sun, Sep 01, 2002 at 02:25:53PM +1000, Russell wrote: > Russell wrote: > > > > Hi, > > > > When i try a command like: > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] echo "yes" > > > > then after i press "return", i get a command prompt ">" which > > seems to be waiting for more

Re: Bash commands

2002-08-31 Thread Russell
Russell wrote: > > Hi, > > When i try a command like: > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] echo "yes" > > then after i press "return", i get a command prompt ">" which > seems to be waiting for more input. Why does that happen? sorry, i missed out some things. I think the pr

Bash commands

2002-08-31 Thread Russell
Hi, When i try a command like: debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] echo "yes" then after i press "return", i get a command prompt ">" which seems to be waiting for more input. Why does that happen? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe".

Re: no bash commands work

1999-08-05 Thread Michael Stenner
On Wed, Aug 04, 1999 at 07:38:12PM -0500, Brian Servis wrote: > *- On 4 Aug, wonko wrote about "no bash commands work" > > i use xdm to logon in x and everything works in x, but when i switch to > > a different terminal for any command it says bash command not found

Re: no bash commands work

1999-08-05 Thread Brian Servis
*- On 4 Aug, wonko wrote about "no bash commands work" > i use xdm to logon in x and everything works in x, but when i switch to > a different terminal for any command it says bash command not found, and > i can't restart without going into xdm since i can't run the

no bash commands work

1999-08-05 Thread wonko
i use xdm to logon in x and everything works in x, but when i switch to a different terminal for any command it says bash command not found, and i can't restart without going into xdm since i can't run the command... help!