Skip to content

Instantly share code, notes, and snippets.

@Starraider
Last active May 25, 2020 06:12
Show Gist options
  • Save Starraider/baade61f479e4373b8a7aa80b1d8a12a to your computer and use it in GitHub Desktop.
Save Starraider/baade61f479e4373b8a7aa80b1d8a12a to your computer and use it in GitHub Desktop.
Tipps and tricks for the command line

Tips and tricks for the command line

How to generate a path with escaped spaces and special characters

printf %q "~/my/very stupid/path/with spaces/"

output will be:

\~/my/very\ stupid/path/with\ spaces/%

Don't use escaped path within quotation marks "" or ''!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment