Answer Posted / swaroopa
The test command is particularly useful in this context
allowing a variety of conditions to be checked for. There
are two equivalent syntaxes.
test expression
and
[ expression ]
The following simple example will list all the
subdirectories of the current directory.
for i in *
do
if [ -d $i ]
then
echo $i
fi
done
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
c program to display the information of given file similar to givan by the unix or linux command ls -l
What is a shell made of?
How do I run a shell script on a mac?
Which shell is the best?
What is gui scripting?
How many fields are present in a crontab file and what does each field specify?
How do I open the shell in cmd?
What is a shell environment?
What are "c" and "b" permission fields of a file?
How are shells born?
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
Is bash a shell script?
Is shell scripting useful?
What does $$ mean in shell script?
When should shell programming/scripting not be used?