On Wed, Jan 05, 2011 at 02:27:39AM -0800, S Mathias wrote:
> $ echo ${PWD##*/}
> somefolder
> $ if "${PWD##*/}" -eq "asdf" > /dev/null; then echo "this is the asdf 
> folder"; else exit 1; fi

if [ "${PWD##*/}" == "asdf" ]; then echo "this is the asdf folder"; else exit 
1; fi


Why not simple use:

if [ -e $SCRIPT ]; then
  echo "File exists";
else
  echo "File does not exist";
fi



Regards,
Didar


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110105104413.ga2...@didar-laptop

Reply via email to