On Wed, 2003-08-27 at 20:03, Andrew McNaughton wrote: > On Wed, 27 Aug 2003 [EMAIL PROTECTED] wrote: > > > Voytek Eymont <[EMAIL PROTECTED]> writes: > > > > > what did i stuff up..? > > > > > > # ./backmysql.sh > > > bash: ./backmysql.sh: /bin/bash: bad interpreter: Permission denied > > > > dos2unix backmysql.sh > > Also I recommend you make a habit of using #!/bin/sh - may not matter for > you just now, but it's important for compatibility across different unix > systems. > > * On at least some linux distributions, /bin/sh is usually (and > peculiarly) provided as a hard link to bash, but on many systems sh is a > much lighter executable without all the stuff for interactive use. > > * Most non-linux systems don't have a file at /bin/bash. /bin/sh will > always be there.
Then you can code this in your if statements if [ -f $FILENAME ] ; then fi And it will not work. This is not valid /bin/sh scripts, because most systems actually use ksh or bash you think you are safe and then you need to move it and it does not work. This is a little more complex. Don't do this unless it is necessary. -- Thanks KenF OpenOffice.org developer -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug