Skip to content

Instantly share code, notes, and snippets.

@wchargin
Created July 11, 2018 20:21
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 wchargin/ad87571235ad0bbb02a998d4a2e2c6e3 to your computer and use it in GitHub Desktop.
Save wchargin/ad87571235ad0bbb02a998d4a2e2c6e3 to your computer and use it in GitHub Desktop.
$ touch file1 'filename with spaces'
$ for file in *; do cp "$file" "$file.bak"; done
$ ls -1
file1
file1.bak
filename with spaces
filename with spaces.bak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment