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

How to know that your remote server is ruing smoothly or not in unix?

1 Answers  


Differentiate between ‘ and ” quotes.

0 Answers  


What is shell chemistry?

0 Answers  


How to include comments in your shell scripts?

3 Answers  


Create a bash shell script that reads in a number from the user. If the number is 1, print out the date. If the number is 2, list the files in the current directory. If the number is 3, print out who is currently logged onto the system. If the number is anything else, print out an error message and exit. Name this script "various.sh"

4 Answers  






Please give me example of " at command , contrab command " how to use

0 Answers  


What is an inode block?

0 Answers  


What is another name for a bash shell script that you might see?

0 Answers  


What are "c" and "b" permission fields of a file?

0 Answers  


how to create purchase order

2 Answers  


How can I send a mail with a compressed file as an attachment?

0 Answers  


I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?

0 Answers  


Categories