//View Tip #549
Similar Tips
» Generate a random password
» Stream shell commands to Twitter
» Change extension on a group of files using only bash builtins an
» Insert last argument
» list the most recent files in a directory


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
The 'read' command can be used to split arguments based on any arbitrary character using IFS:

$ echo 'a/bc/ de fg hi/j' | { IFS='/' read first second others; echo "$first"; echo "$second"; echo "$others"; }
 de fg hi/j

View Comments »


Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit