How to redirect a list of human readable paths to another command?
3
votes
3
answers
110
views
When working with the output of commands such as
locate
which produce lists of paths in "human readable form" (i.e. without \
in front of spaces), how do you redirect their output to another command?
The output of $ locate [something]
produces paths with spaces in them, which inhibits other programs to use the paths in the case they contain spaces. For example, if I were to
$ du -h locate *.doc
this will produce an error on all files and directories that contain spaces. (wrapping the ticks in spaces does not work)
Asked by rien333
(701 rep)
Apr 24, 2017, 09:17 PM
Last activity: Oct 6, 2024, 09:22 AM
Last activity: Oct 6, 2024, 09:22 AM