Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 are environment variables?

2 Answers  


how to separate the even and odd number generated from one file to two separate file i.e. even numbers in file1.txt and odd numbers in file2.txt

3 Answers   Infosys,


What is shell application?

0 Answers  


What does $0 mean in shell script?

0 Answers  


Write a shell script to check whether a number is Armstrong number or not?

1 Answers   Flipkart,






What is the meaning of $1 in shell script?

0 Answers  


How do you schedule a command to run at 4:00 every morning?

5 Answers   Wipro,


What is the use of "test" command?

2 Answers  


I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this?

0 Answers  


What exactly is a shell?

0 Answers  


Explain about stdin, stdout and stderr?

0 Answers  


Explain about the slow execution speed of shells?

0 Answers  






Categories