find ... -print0 | xargs -r0 ...
is safer.
]]>Ps Luke Smith made a tutorial where he uses ls *.jpg| sxiv -tio
He's made a lot of other problematic stuff too.
]]>but this also works: `mkdir copied/ | printf '%s\n' *.jpg| sxiv -tio | xargs -I {} cp {} copied/` and i got rid of warning.
`mkdir cop/ | sxiv -tio *.jpg | xargs -I {} cp {} cop/` this works too
this pass through shellcheck with no warning: `mkdir copy/ | sxiv -tio ./*.jpg | xargs -I {} cp {} copy/` and it works
thanks a bunch to you all that is all i need.
Ps Luke Smith made a tutorial where he uses ls *.jpg| sxiv -tio
bye
]]>mv $(sxiv -tio *.jpg) pokus/
If you don't like that approach, at least get rid of the useless ls:
sxiv -tio *.jpg | xargs ...
edit: actually the second version above is probably safer depending on exactly how sxiv outputs filenames (I have no experience with it).
]]>`ls *.jpg | sxiv -tio | xargs -n1 -I '{}' mv '{}' pokus/`
seems to do what I need.
]]>[fekal@f screenshots1]$ ls *.jpg | sxiv -tio
2022-01-10-170422_3200x1080_scrot.jpg
2022-01-10-192421_3200x1080_scrot.jpg
2022-01-10-195101_3200x1080_scrot.jpg
2022-01-11-074643_3200x1080_scrot.jpg
2022-01-11-080643_3200x1080_scrot.jpg
2022-01-11-082323_3200x1080_scrot.jpg
how can I use simple command on these files like `cp (this list) ./new-folder`?
I know you can do echo and put them to some list but I would love to know if I can use command on block like this without making list.