Created
February 2, 2013 03:55
-
-
Save timf/4696052 to your computer and use it in GitHub Desktop.
Pipe or redirect-output from a sh for loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(~)$ for x in `seq 5`; do echo $x; done | xargs ls | |
ls: 1: No such file or directory | |
ls: 2: No such file or directory | |
ls: 3: No such file or directory | |
ls: 4: No such file or directory | |
ls: 5: No such file or directory | |
(~)$ for x in `seq 5`; do echo $x; done > tmpfile | |
(~)$ cat tmpfile | |
1 | |
2 | |
3 | |
4 | |
5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment