[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Brace expansion
From: |
Ray Parrish |
Subject: |
Brace expansion |
Date: |
Sat, 04 Apr 2009 20:01:56 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080925 Thunderbird/2.0.0.17 Mnenhy/0.7.6.0 |
Hello,
I'm attempting to study Brace Expansion at the same named page at
bash-hackers.org and it states the following -
Generate numbers with a prefix 001 002 ...
Using a prefix:
for i in 0{1..9} 10; do printf "%d\n" "$i";done
However I am getting *this* output when running their command in
Terminal In Ubuntu 8.04
ray@ray-desktop:~$ for i in 0{1..9} 10; do printf "%d\n" "$i";done
1
2
3
4
5
6
7
bash: printf: 08: invalid number
0
bash: printf: 09: invalid number
0
10
So... what gives??? I tried looking at info coreutils 'printf
invocation', and it does not even explicitly spell out what the %d
argument means, instead it just tells me "it's like the C printf, except
for these differences". I have never used C, and have no idea where to
look it up, so what good is that info page??? I'm trying to learn bash,
and have no desire to learn to program in C.
Later, Ray Parrish
--
Human reviewed index of links about the computer
http://www.rayslinks.com
Poetry from the mind of a Schizophrenic
http://www.writingsoftheschizophrenic.com/
- Brace expansion,
Ray Parrish <=