Write a shell script to looking at the log file to see if
the test has passed or not

Answers were Sorted based on User's Feedback



Write a shell script to looking at the log file to see if the test has passed or not..

Answer / kirtiranjan sahoo

test -f $(find /var/log/messages -name "file.log" )
echo $?
If it returns 0 means passed
if 1 means not passed

Is This Answer Correct ?    0 Yes 0 No

Write a shell script to looking at the log file to see if the test has passed or not..

Answer / guest

tail -f /var/log/messages provided all the messages are
appended to the log.

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More Shell Script Interview Questions

What is the command to find out users on the system?

0 Answers  


Differentiate between ‘ and ” quotes.

0 Answers  


How many prompts are available in a UNIX system?

1 Answers  


What makes c shell a more preferable option than the bourne shell?

0 Answers  


What is the syntax of "grep" command?

4 Answers  






Write down the syntax of "for " loop

0 Answers  


What language is used in terminal?

0 Answers  


what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?

1 Answers  


What are the different kinds of loops available in shell script?

3 Answers  


What is bourne shell scripting?

0 Answers  


What is the purpose of scripting?

0 Answers  


Write down the syntax for all the loops in shell scripting.

0 Answers  


Categories