Last active
December 30, 2015 01:19
-
-
Save maplebed/7755772 to your computer and use it in GitHub Desktop.
This file contains 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
➜ export IFS=' | |
' | |
:( ( 12/02/13@11:36AM )( maplebed@maplebook ):~/tmp | |
➜ args=($(ls -1)) 1 | |
:) ( 12/02/13@11:36AM )( maplebed@maplebook ):~/tmp | |
➜ !echo | |
:) ( 12/02/13@11:36AM )( maplebed@maplebook ):~/tmp | |
➜ echo $args | |
file one file two four and five three | |
:) ( 12/02/13@11:36AM )( maplebed@maplebook ):~/tmp | |
➜ echo $args[1] | |
file one | |
:) ( 12/02/13@11:36AM )( maplebed@maplebook ):~/tmp | |
➜ for i in $args ; do echo $i ; done | |
file one | |
file two | |
four and five | |
three | |
:) ( 12/02/13@11:36AM )( maplebed@maplebook ):~/tmp | |
➜ cat $args | |
➜ for i in $args ; do echo "I am $i " > $i ; done | |
:) ( 12/02/13@11:37AM )( maplebed@maplebook ):~/tmp | |
➜ cat $args | |
I am file one | |
I am file two | |
I am four and five | |
I am three |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This matches my use case a little more closely: