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 does $$ mean in shell script?
What exactly is a shell?
How important is shell scripting?
Why should we use shell scripts?
What is the difference between bash and shell?
How to debug the problems encountered in the shell script/program?
Why is a script important?
What is @echo off?
What is the use of echo in shell script?
Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?
What is bash eval?
What is bash shell command?
What happens on a system call?
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?