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

wats the she bang statment with syntax?

3 Answers  


What are the advantages of using shell scripts?

0 Answers  


write a scwipt that a) takes exactly one argument, a directory name. b) if the number of argument is more or less than one,print a usage message c) if the argument is not adirectory, print another message d) for the given directory, print the five biggest files and the five files that were most recently modified. e) save the output to a file called q2output.

2 Answers  


Is shell scripting useful?

0 Answers  


If you have a string "one two three", which shell command would you use to extract the strings?

5 Answers  


What does sh mean?

0 Answers  


How do you read arguments in a shell program - $1, $2 ..?

4 Answers  


Write a shell program to test whether a given number is even or odd?

8 Answers  


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

0 Answers  


Where is bash history?

0 Answers  


Is it possible to substitute "ls" command in the place of "echo" command?

0 Answers  


Explain about gui scripting?

0 Answers  


Categories