what is the use of "test" command in unix?

Answer Posted / samrat biswal

Test is a condition evaluation command.The test command
evaluates the expression if the value is True,returns a
zero exit status; otherwise,a nonzero exit status is
returned.test also returns a nonzero exit status if there
are no arguments.

Is This Answer Correct ?    27 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is rmdir command?

792


Name the general commands in using unix os for a beginner?

804


What is {} in find command?

783


What do chgrp command do?

828


What is the difference between cat and more command?

902


Which command will print your home directory on screen?

788


How do you grep recursively?

775


What does the command '$ls | wc –l > file1' do?

905


How do I clear my terminal history?

801


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1975


What is time_t?

784


How do I search a whole word in vim?

885


What is grep short for?

749


What are reported commands?

803


Who wrote grep?

771