Write a shell script to looking at the log file to see if
the test has passed or not
Answer Posted / 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 |
Post New Answer View All Answers
What is the significance of $#?
Why do we write bin bash in shell scripts?
What are the two files of crontab command?
What is a shell in operating system?
How to get the last line from a file using just the terminal?
What is shell application?
How to get script name inside a script?
What is sh in shell script?
What is eval in shell script?
What can scripts do?
State the advantages of shell scripting?
What is shell scripting used for?
How do we delete all blank lines in a file?
Write down the syntax for all the loops in shell scripting.
What is the use of "$#" in shell scripting?