//View Tip #676
Similar Tips
» Remove empty directories
» Change file extension revisited
» Copy and paste from the command line
» Deleting difficult filenames
» Count files by type

 

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

CAPTCHA

No HTML allowed. URLs will be linked with nofollow attribute. Whitespace is preserved.

No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit