Page 1 of 1

embedded script annoyance

PostPosted: Mon Jun 24, 2013 12:48 am
by rameresin
So, this script is working, but the folder is being scanned twice because the script isn't exiting cleanly.
Code: Select all
OLD=`echo "$1"|sed 's/\-NEW//'`
rm "$OLD"
mv "$1" "$OLD"
return 0


Why would this be? This is as simple as it gets; why is it exiting with a return value of 1?

(I'm embarrassed by the question, but want to sort it out. Thanks!)

Re: embedded script annoyance

PostPosted: Mon Jun 24, 2013 1:18 pm
by Mr_Noodle
You want to use exit, not return. Give that a shot.