Re: bash script question

2009-12-01 Thread Dánielisz László
I just find out: #!/usr/local/bin/bash export IFS= cuc=$* mkdir cuc Thanks anyway! László From: Dánielisz László laszlo_daniel...@yahoo.com To: freebsd-questions@freebsd.org Sent: Tue, December 1, 2009 8:37:04 PM Subject: bash script question Hello, I'd

Re: bash script question

2009-12-01 Thread Polytropon
On Tue, 1 Dec 2009 11:48:43 -0800 (PST), Dánielisz László laszlo_daniel...@yahoo.com wrote: I just find out: #!/usr/local/bin/bash export IFS= cuc=$* mkdir cuc The $* variable will expand to all arguments given on the command line, e. g. $ ./myscript foo bar baz will result in

Re: bash script question

2009-12-01 Thread Rolf G Nielsen
Dánielisz László wrote: I just find out: #!/usr/local/bin/bash export IFS= cuc=$* mkdir cuc Thanks anyway! László From: Dánielisz László laszlo_daniel...@yahoo.com To: freebsd-questions@freebsd.org Sent: Tue, December 1, 2009 8:37:04 PM Subject: bash

Re: bash script question

2009-12-01 Thread Polytropon
On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen laz...@lazlarlyricon.com wrote: Why are you using bash? To make a shell script as portable as possible, use /bin/sh. Bash is a third party shell, that isn't included in a base installation (you're not using bash as root's shell, are you?).

Re: bash script question

2009-12-01 Thread Gary Kline
On Tue, Dec 01, 2009 at 10:42:10PM +0100, Polytropon wrote: On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen laz...@lazlarlyricon.com wrote: Why are you using bash? To make a shell script as portable as possible, use /bin/sh. Bash is a third party shell, that isn't included in a base

Re: bash script question

2009-12-01 Thread Rolf G Nielsen
Gary Kline wrote: On Tue, Dec 01, 2009 at 10:42:10PM +0100, Polytropon wrote: On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen laz...@lazlarlyricon.com wrote: Why are you using bash? To make a shell script as portable as possible, use /bin/sh. Bash is a third party shell, that isn't

Re: bash script question

2009-12-01 Thread Polytropon
On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline kl...@thought.org wrote: Hi guys, Here's a bash-related question, kind-of. Is there any way to automagically run my .csrhc thru a script and wind up with a bash script? csh and (ba)sh use dufferent syntax and variable

Re: bash script question

2009-12-01 Thread Gary Kline
On Tue, Dec 01, 2009 at 11:02:07PM +0100, Rolf G Nielsen wrote: Gary Kline wrote: On Tue, Dec 01, 2009 at 10:42:10PM +0100, Polytropon wrote: On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen laz...@lazlarlyricon.com wrote: Why are you using bash? To make a shell script as portable as

Re: bash script question

2009-12-01 Thread Gary Kline
On Tue, Dec 01, 2009 at 11:10:33PM +0100, Polytropon wrote: On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline kl...@thought.org wrote: Hi guys, Here's a bash-related question, kind-of. Is there any way to automagically run my .csrhc thru a script and wind up with a bash