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
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 |
Answer / guest
tail -f /var/log/messages provided all the messages are
appended to the log.
Is This Answer Correct ? | 4 Yes | 7 No |
Why are shell scripts used?
How to calculate the number of passed arguments?
How to get the last line from a file using just the terminal?
What is "test"? How it is used in shell scripting?
Print the 10th line without using tail and head command.
What is a shell script? Can you name some of its advantages?
what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?
What is use of "cut" command?
wats the deinitions for shell utility and filter?
What is the first line of a shell script called?
How to print pid of the current shell?
What is Linux language details