embedded script annoyance

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

embedded script annoyance 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!)
rameresin
 
Posts: 1
Joined: Sun Jun 23, 2013 8:24 am

Re: embedded script annoyance Mon Jun 24, 2013 1:18 pm • by Mr_Noodle
You want to use exit, not return. Give that a shot.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support