Two things. You write
Code:
if [! -e "$item"];
echo The File does not exit
exit
fi
This has two errors and should read
Code:
if [ ! -f "$item" ]; then
echo "$item does not exist"
exit
fi
Amend to that and see if that fixes it.
You've also got spaces in your variable assignment, and no $ infront of the file variable name to reference it. You are, in effect, setting the value of item to "file". Another "no, no!"
Do this
as you can see, no spaces either side of the equals.
Elaborate more on the script. What does it do? What is it for? And give the "proper" output from the script.
Cheers
ZB
http://www.zazzybob.com