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 egrep?

2 Answers  


How can you find out how long the system has been running?

0 Answers  


What is the way to do multilevel if-else's in shell scripting?

0 Answers  


How does shell scripting work?

0 Answers  


How to get the 3rd element/column from each line from a file?

0 Answers  


What does debug script mean?

0 Answers  


I Forgot My Windows Vista Password! How Can I Find My Windows Lost Password?

1 Answers  


Which is best institute for testing tool?

0 Answers  


what is the difference between sh & bash shell?

1 Answers  


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

0 Answers  


What is the use of echo in shell script?

0 Answers  


How to group the commands in shell scripting?

2 Answers   Polaris,


Categories