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

I have 2 files and I want to print the records which are common to both.

0 Answers  


Is bash an operating system?

0 Answers  


Write the syntax for "if" conditionals in linux?

0 Answers  


In a single command how do you run the previous command in the command prompt.

5 Answers  


how to read systems current date and time

4 Answers  






What is meant by dos operating system?

0 Answers  


How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

0 Answers  


How to handle the delimiter unit seperator in Unix

2 Answers  


What is the difference between a shell variable that is exported and the one that is not exported?

6 Answers  


Explain about the exit command?

0 Answers  


How to redirect both standard output and standard error to the same location?

0 Answers  


How to check if the previous command was run successfully?

0 Answers  


Categories