Skip to content

Instantly share code, notes, and snippets.

@mrmanc
Created November 24, 2014 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrmanc/8aef830945ce03aa65f0 to your computer and use it in GitHub Desktop.
Save mrmanc/8aef830945ce03aa65f0 to your computer and use it in GitHub Desktop.
Problem caused by apostrophe’s special meaning in xargs
In response to http://askubuntu.com/questions/80244/how-do-i-sort-by-human-readable-sizes-numerically/552976?noredirect=1#answer-552976
mark:~/dutest $ touch "a'b"
mark:~/dutest $ du -s * | sort -n | cut -f2
a'b
mark:~/dutest $ du -s * | sort -n | cut -f2 | xargs du -sh
xargs: unterminated quote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment