Use of {}
for the block of code
Code:
servers=`echo Machine0{1,2,3,4,5,6,7,8,9}` Code:
Machine01 Code:
Machine0{1,2,3,4,5,6,7,8,9} please advice. |
Code:
`echo Machine0{1,2,3,4,5,6,7,8,9}` Come to think of it... Take out the "echo" from the "servers=" statement and try again. Play Bonny! :hattip: |
This works for me.
Code:
^_^[sam@farcry:~]$ servers=`echo Machine0{1,2,3,4,5,6,7,8,9}` Code:
set +o noglob Code:
for i in {1..9};do |
set +o noglob
I tried `set +o noglob` and the other solution you suggested but still getting the same result.
|
What shell are you using?
|
bourne shell
bourne shell
|
So your output is as follows:
Code:
$ echo $SHELL |
yes
|
In that case, please perform the following and provide the output:
Code:
ls -l /bin/sh |
If you're truly using the bourne shell and not some variant of the bourne again shell (bash) then I don't believe that using brackets like that is available to you.
Code:
man 1 sh |
Quote:
The (real) Bourne shell is very unlikely to be installed on your machine. It is generally emulated by clones like dash, bash and others. bash supports the brace based syntax you are using but not dash which is likely what you use. |
@grail ->
$ echo $SHELL /bin/sh $ ls -l /bin/sh -r-xr-xr-x 1 0 0 147056 Oct 1 2013 /bin/sh @jlliagre I am using freeBSD. $ uname FreeBSD |
Quote:
By the way, you are on the Linux Newbie Forum but FreeBSD is quite different from Linux distributions. There is a BSD specific forum here. |
Quote:
|
Moved: This thread is more suitable in *BSD forum and has been moved accordingly to help your thread/question get the exposure it deserves.
|
All times are GMT -5. The time now is 06:36 PM. |