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
I want to connect to a remote server and execute some commands, how can I achieve this?
Write a script to print the first 10 elements of fibonacci series.
How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }
What are the different communication commands available in the shell?
What is wc in shell script?
What is the fastest scripting language?
What are the 3 standard streams in linux?
wats the deinitions for shell utility and filter?
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 shell is bin sh?
Which is better perl or shell scripting?
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.
When should shell programming/scripting not be used?
What does egrep mean?
How would you compare the strings in a shell script?