You are not logged in.
Pages: 1
So if I do a find I get something like `./foo bar` but I want to get `./foo\ bar` and I know I can just look for each space but there are some other characters that have the same thing like `./[foo] bar` should be `./\[foo\]\ bar`.
Last edited by AMTitan (2021-06-06 17:49:32)
Offline
This sounds like an XY problem. What are you trying to do? It sounds like you may be trying to parse the output of find rather than use the {} notation where you can substitute the file name actually found in things like exec clauses.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
This sounds like an XY problem. What are you trying to do? It sounds like you may be trying to parse the output of find rather than use the {} notation where you can substitute the file name actually found in things like exec clauses.
I am trying to take the output and make a slide show from all the pictures from a lot of different folders and want to do a find from the root directory, but some of the names have spaces and different things that need the backslash.
Offline
I found it
```
find -print0 | xargs -0 bash -c 'printf "%q\n" "$@"'
```
Offline
Pages: 1