|
Case Statement
Can anyone please tell me why this wont work! Thanks so much!
#!/bin/sh
for file
do
case $file in
*.*.*)
echo Cannot have more than 1 dot
exit
;;
*'**'*)
echo Cannot have more than 1 asterisk
exit
;;
*'*'*|?.)
echo this is a target
;;
*)
echo This is a file
item = file
;;
esac
done
if [! -e "$item"];
echo The File does not exit
exit
fi
It just says Item not found? Thanks
|