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
Write the syntax for "if" conditionals in linux?
What language is shell scripting?
How do I run a script on mac?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What is mac default shell?
What is the use of "$?" Sign in shell script?
Determine the output of the following command: name=shubham && echo ‘my name is $name’.
How to find duplicate record in file using shell script?
What is scripting used for?
What are scripts in psychology?
What is shell scripting used for?
Differentiate between ‘ and ” quotes.
What are the advantages of shell scripting?
How to print the first array element?
What is in a script?