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 |
wats the she bang statment with syntax?
What are the advantages of using shell scripts?
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.
Is shell scripting useful?
If you have a string "one two three", which shell command would you use to extract the strings?
What does sh mean?
How do you read arguments in a shell program - $1, $2 ..?
Write a shell program to test whether a given number is even or odd?
How can you find out how long the system has been running?
Where is bash history?
Is it possible to substitute "ls" command in the place of "echo" command?
Explain about gui scripting?