shell-scripte-code/cp_onefile.sh

24 lines
331 B
Bash
Raw Normal View History

2017-08-22 00:12:15 +02:00
#!/bin/bash
finds=$(find -name $1)
set -ex
i=0
for wort in $finds
do
echo "$wort"
FILENAME=${wort##*/} # Dateiname ist alles ab dem letzten '/'
echo "$FILENAME"
cp $wort ""$2""$i""-""$FILENAME""
i=$(expr ${i} + 1)
done
2017-08-21 22:38:38 +02:00
sync
2017-08-22 00:12:15 +02:00
echo "Fertig!!!"
#./cp_onefile.sh onefile-final.mp3 /mnt1/