Hi,
Find give's me errors in some directories, i have created a little script for renaming about 3000 mp3 files (removing spaces from the file manes)
I tested the find command in a directory with a dummy file and it works, now i'm going to test it on a real directory i get a error that my find syntax is wrong, but its always the same.
Can anyone put some light on this, renaming that dir won't help.
test dir (works)
pwd = /home/patrick/rename_testen
patrick@Inteprid rename_testen $ find . -name *.mp3 -exec ./ikke.sh '{}' \;
real dir (don't work)
pwd = /data/muziek/tunes
patrick@Inteprid tunes $ find . -name *.mp3 -exec ./ikke.sh '{}' \;
find: padnamen moeten de expressies voorgaan
Gebruik: find [pad...] [expressie]
works (but with false ikke.sh)
pwd = /data/muziek
patrick@Inteprid muziek $ find . -name *.mp3 -exec ./ikke.sh '{}' \;
find: ./ikke.sh: Onbekend bestand of map (because ikke.sh isn't there, just for a test)
the ikke.sh
#/bin/bash
#Purpose rename a file with spaces to underscores
newname=`echo $1 | sed 's/ \+/_/g'`
mv "$1" $newname
TIA
Patrick
--
gentoo-user@gentoo.org mailing list
Find give's me errors in some directories, i have created a little script for renaming about 3000 mp3 files (removing spaces from the file manes)
I tested the find command in a directory with a dummy file and it works, now i'm going to test it on a real directory i get a error that my find syntax is wrong, but its always the same.
Can anyone put some light on this, renaming that dir won't help.
test dir (works)
pwd = /home/patrick/rename_testen
patrick@Inteprid rename_testen $ find . -name *.mp3 -exec ./ikke.sh '{}' \;
real dir (don't work)
pwd = /data/muziek/tunes
patrick@Inteprid tunes $ find . -name *.mp3 -exec ./ikke.sh '{}' \;
find: padnamen moeten de expressies voorgaan
Gebruik: find [pad...] [expressie]
works (but with false ikke.sh)
pwd = /data/muziek
patrick@Inteprid muziek $ find . -name *.mp3 -exec ./ikke.sh '{}' \;
find: ./ikke.sh: Onbekend bestand of map (because ikke.sh isn't there, just for a test)
the ikke.sh
#/bin/bash
#Purpose rename a file with spaces to underscores
newname=`echo $1 | sed 's/ \+/_/g'`
mv "$1" $newname
TIA
Patrick
--
gentoo-user@gentoo.org mailing list