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
What is the way to do multilevel if-else's in shell scripting?
c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command
What is bourne shell scripting?
Explain about sourcing commands?
What are the 3 standard streams in linux?
How to print all array elements and their respective indexes?
What is bash coding?
What is basename in shell script?
What happens when you type ls?
What are different types of shell?
What are scripts in psychology?
wats the deinitions for shell utility and filter?
how will you find the total disk space used by a specific user?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
What does echo $0 do?