home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 10
/
aminetcdnumber101996.iso
/
Aminet
/
util
/
sys
/
shell_1_0.lha
/
shell-1.0
/
test_unix_if
< prev
Wrap
Text File
|
1995-12-07
|
696b
|
49 lines
set file test_if3
if [ -L $file ]
then
echo $file is a link
elif [ -S $file ]
then
echo $file is a socket
elif [ -b $file ]
then
echo $file is a block special
elif [ -c $file ]
then
echo $file is a character special
elif [ -d $file ]
then
echo $file is a directory
elif [ -f $file ]
then
echo $file is a regular file
fi
if [ -e $file ]
then
echo $file exists
fi
if [ -r $file ]
then
echo $file is readable
fi
if [ -w $file ]
then
echo $file is writable
fi
if [ -r $file ]
then
echo $file is executable
fi
set file2 test_if
list ($file|$file2)
if [ $file -nt $file2 ]
then
echo $file is newer than $file2
else
echo $file is older than $file2
fi