Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Write the syntax for "if" conditionals in linux?

1051


What language is shell scripting?

971


How do I run a script on mac?

1028


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.

2423


What is mac default shell?

1049


What is the use of "$?" Sign in shell script?

1093


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

930


How to find duplicate record in file using shell script?

1321


What is scripting used for?

992


What are scripts in psychology?

988


What is shell scripting used for?

933


Differentiate between ‘ and ” quotes.

1087


What are the advantages of shell scripting?

985


How to print the first array element?

980


What is in a script?

959