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

Why are shell scripts used?

0 Answers  


How to calculate the number of passed arguments?

0 Answers  


How to get the last line from a file using just the terminal?

0 Answers  


What is "test"? How it is used in shell scripting?

2 Answers  


Print the 10th line without using tail and head command.

0 Answers  


What is a shell script? Can you name some of its advantages?

0 Answers  


what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?

1 Answers  


What is use of "cut" command?

3 Answers  


wats the deinitions for shell utility and filter?

0 Answers  


What is the first line of a shell script called?

0 Answers  


How to print pid of the current shell?

0 Answers  


What is Linux language details

0 Answers   Quick Heal,


Categories