Quote:
Originally Posted by syg00
LQ has rules against asking homework questions - all your posts so far have been this homework.
Show us what you have tried, and the failure - then we can help point you in the right direction.
|
hello... i've writtent the following code...i don't know how to use AND operator and how to use if fi in bash...below is my work:
#dnt knw how to use AND operator in bash
if [ -e file1.pl -a -e file2.pl ] ;
then printf "2: two files exist\n"
printf "=======================================\n"
# dont knw how to use else if in bash...
elsif [ -e file1.pl] ;
printf "1: 1 file exists\n"
printf "=======================================\n"
# dnt knw how to show that the directory is empty
elsif [.......]
printf "0: no file exists\n"
printf "=======================================\n"