keskiviikko 13. helmikuuta 2013

Random encounter!

[ksym@plains ~]$ ls test
another-name                    name with even more spaces
just-a-name                     name with spaces
- A wild pack of filenames_with_spaces appears!
- ksym casts minor shell magic
[ksym@plains ~]$ pos=0; for file in `ls test`; do let pos++; echo $pos:$file; done
- filenames_with_spaces counters with shell_retardation
1:another-name
2:just-a-name
3:name
4:with
5:even
6:more
7:spaces
8:name
9:with
10:spaces
- It is effective! ksym takes damage to SAN!
- ksym uses power_word:IFS
[ksym@plains ~]$ IFS="`printf '\n\t'`"; export IFS
- ksym recasts minor shell magic
[ksym@plains ~]$ pos=0; for file in `ls test`; do let pos++; echo $pos:$file; done
1:another-name
2:just-a-name
3:name with even more spaces
4:name with spaces
- It is Super Effective!
- filenames_with_spaces have been listed sequentially with position number
- ksym won!
[ksym@plains ~]$ 8-)

Ei kommentteja:

Lähetä kommentti