[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] existence of a file



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...