Advertisement
Tritonio

xargs with filenames with spaces in them or single quotes

May 12th, 2021
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. The xargs command takes white space characters (tabs, spaces, new lines) as delimiters.
  2.  
  3. You can narrow it down only for the new line characters ('\n') with -d option like this:
  4.  
  5. ls *.mp3 | xargs -d '\n' mplayer
  6.  
  7. It works only with GNU xargs.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement