Skip to content

Instantly share code, notes, and snippets.

@jimkang
Created November 15, 2018 00:07
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 jimkang/fb2bead9804431493be47db8caee87af to your computer and use it in GitHub Desktop.
Save jimkang/fb2bead9804431493be47db8caee87af to your computer and use it in GitHub Desktop.
Move files (unsafely) with a file extension that matches the argument into a directory named for that extension.
#!/bin/bash
for file in ./recup_dir*/*.$1
do
mv ${file} $1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment