Substitution of a command, but without interrupting the output in multiple arguments
Is there a way to perform command substitution in the BASH shell without breaking the output on multiple arguments?
I copy the path from some directory (from the location string in the GUI browser) to the clipboard and then issue the following command where the xsel command returns the contents of the clipboard, which is a directory in this case:
cd `xsel`
But some path contains spaces or may even contain some special characters used by BASH.
How can I pass the output of a command as one argument and without BASH messing with special characters?
+2
source to share
3 answers