[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bourne sh redirection, a loop variable, and ':'
From: |
Ralf Wildenhues |
Subject: |
Bourne sh redirection, a loop variable, and ':' |
Date: |
Wed, 3 Sep 2008 21:45:52 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
is this nice little Bourne shell quirk already known?
$ for i in 1 2 3 ; do : >x$i; done
$ ls
x1
It works when I use 'echo' instead of ':'.
Seen with Solaris 10 sh, but also some other old shells IIRC.
Cheers,
Ralf
- Bourne sh redirection, a loop variable, and ':',
Ralf Wildenhues <=