mirror of
https://github.com/ff4500/utilities.git
synced 2026-07-01 11:47:04 -05:00
Create makedir_copyfiles.sh
This commit is contained in:
12
makedir_copyfiles.sh
Normal file
12
makedir_copyfiles.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
input_dir="/media/tomove"
|
||||||
|
|
||||||
|
for file in $input_dir/*.* ; do
|
||||||
|
dir="${file%.*}"
|
||||||
|
mkdir -- "$dir"
|
||||||
|
mv -- "$file" "$dir"
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user