Skip to content

Instantly share code, notes, and snippets.

@backslash-f
Last active September 3, 2020 13:36
Show Gist options
  • Save backslash-f/613c9d21d19a8e083389dec623846560 to your computer and use it in GitHub Desktop.
Save backslash-f/613c9d21d19a8e083389dec623846560 to your computer and use it in GitHub Desktop.
Append same String in many files (e.g. @1x, @2x, @3x, etc)
# Source: https://stackoverflow.com/a/24302276/584548
for i in *; do name="${i%.*}"; mv "$i" "${name}πŸ‘‰πŸ»πŸ‘‰πŸ»πŸ‘‰πŸ»@1xπŸ‘ˆπŸ»πŸ‘ˆπŸ»πŸ‘ˆπŸ»${i#$name}"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment