Created
January 9, 2011 06:29
-
-
Save sixman9/771482 to your computer and use it in GitHub Desktop.
Awk variable assignment for loop
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
for myFileSetVar in `find /some/path -iname '*some.file*'`; do newAwkVar=`echo $myFileSetVar | awk -F/ '{print $1}'`; echo $newAwkVar came from $myFileSetVar; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment