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 difference between scripting and coding?

0 Answers  


How will you pass and access arguments to a script in linux?

0 Answers  


What does echo mean in scripting?

0 Answers  


Is shell scripting a programming language?

0 Answers  


What does the sh command do?

0 Answers  






What is inside a seashell?

0 Answers  


What is meant by dos operating system?

0 Answers  


How to debug the problems encountered in the shell script/program?

0 Answers  


What is MUTEX?

1 Answers  


There are three departments A,B and C.Write a query to display the names of all the persons( in departments other than A) who are paid higher than the person receiving the lowest salary in DEPT A

1 Answers   Wipro,


What are the different types of shell scripting?

0 Answers  


What are the 4 basics of OOP?

1 Answers   Amazon, Infosys,


Categories