[ale] existence of a file

Mike Kachline mkachline at gmail.com
Tue Apr 10 22:40:52 EDT 2007


Terry,

 Which shell are you working under?
Perhaps try putting your test for $file within quotes?

   - Mike

#!/bin/bash
file="/dev/blah";
if [ ! -e "$file" ] ; then
        echo "devblah does not exist.";
fi;

#!/usr/bin/perl
$file = "/dev/blah";
if( ! -e "$file") {
        print "devblah does not exist.\n";
}



-- 
Mike Kachline
mkachline at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list