Skip to content

Instantly share code, notes, and snippets.

@luckylittle
Created January 27, 2022 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luckylittle/3eb92f4796ebaa0efd756dc103165122 to your computer and use it in GitHub Desktop.
Save luckylittle/3eb92f4796ebaa0efd756dc103165122 to your computer and use it in GitHub Desktop.
Example of the command that is useful for processes that change file extension and also have spaces in the filename
find . type f -name '*.original_extension' -execdir /bin/zsh -c '/usr/bin/echo $0 ${0/original_extension/new_extension}' {} \;
######################################################################
## Before: ./01-Part 1.original_extension ##
## After: ./01-Part 1.original_extension ./01-Part 1.new_extension ##
######################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment