//View Tip #676
Similar Tips
» Being selfish - Kick all users except you
» Argument list too long
» Change file extension revisited
» Deleting difficult filenames
» Remove empty directories

 

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
This is the general form; it will run 'mycommand' once for each line of text you enter with that line of text supplying the arguments to the command:

cat | xargs -L1 mycommand

Changing to ledit adds readline support:

ledit | xargs -L1 mycommand

Example: A simple REPL for sending commands to a DBus object:

ledit | xargs -L1 -ILINE dbus-send --print-reply --dest=mydest myobj myiface.LINE


View Comments »




Comments 

Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit