I think you want the status of instances of all/different applications... so you can take an array which stores the name of different applns whose instance's status you want to check and for each application you can run that command i mentioned earlier... it will be something like this...
Kindly bear with the syntax... please refer to man for correct one...
Quote:
Originally Posted by saisneha
Can you please give me a example to use the loop,. I am very new to this.
I would like to grep app1, app2, xxx, yyy, 3333 etc and give the status if they are in the stop status.
Thank you,
Sai
---------- Post updated at 04:59 PM ---------- Previous update was at 10:09 AM ----------
Hi,
Can anyone help please. This code does not work for me. I neither get email not get any error.
AppInstance=(abc, def, ghi, jkl, mno, opr etc )
for i in "${AppInstance[@]}"
do
AppInstance_status='ps -ef | grep {AppInstance[i]}'
if [ -z "$AppInstance_status" ];
then
echo "App Instances are not running . $(hostname) as on $(date)"
> ~\AppInstance_status.txt
fi
done
cat ~\AppInstance_status.txt | mail -s "Alert: AppInstance status check on Production " email_address
I have the complete list of grep commands in the txt file which should run and give the output.
Hi
A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as
" usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Hi,
I am using the mailx command to send email to multple users. The command works fine when i am sending mail to a single user but when i insert multiple email ids inside the quote it does not work. All the email ids are coming from a property file.Please have a lookt at the property file and... (4 Replies)
hi,
i'm pretty new to this unix. i've been asked to create a shell script which will pick up the email id from a text file(stored in same machine, same directory) searches for that id in another file in which a product name( a one line text) is mentioned against it. then it should send a mail... (0 Replies)
Hi,
This is my text file I'm trying to Grep.
Apple Location Greenland Rdsds dsds fdfd ddsads http Received Return Immediately Received End
My Grep command:
grep only--matching 'Location.*Received'
e.
Because the keyword Received appears twice, the Grep command will stop at the last... (0 Replies)
Hi,
This is my text file I'm trying to Grep.
Apple Location Greenland Rdsds dsds fdfd ddsads http Received Return Immediately Received End
My Grep command:
grep only--matching 'Location.*Received'
Because the keyword Received appears twice, the Grep command will stop at the last... (3 Replies)
Hello ,
I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them .
I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Hello. This shouldn't be an unusual problem, but I cannot find anything about it at google or at other search machine.
So, I've made an application using C++ and QtCreator. I 've made a new mime type for application's project files.
My system (ubuntu 10.10), when I right click a file and I... (3 Replies)
Hello ,
I am trying to send an email with two attachments . I have tried all previous suggestion in this forum but none worked. I could send one attachment in an email by
uuencode $file "$file" | mailx -m -s "File" xxx@xx.com
but unable to send multiple attachments .
I have tried
... (8 Replies)
Hi Everyone,
Im currently using the below code to pull data from a large CSV file and put it into smaller files with just the data associated with the number that I "grep".
grep 'M053' test.csv > test053.csv
Is there a way that I can use grep to run through my file like the example below... (6 Replies)
Hello ALL,
need a BASH script who find file and send email with attachment.
I have 50 folders without sub directories in each generated files of different sizes but with a similar name Rp01.txt Rp02.txt Rp03.txt ...etc. Each directors bound by mail group, I need a script that goes as... (1 Reply)
Discussion started by: penchev
1 Replies
LEARN ABOUT DEBIAN
www::freshmeat::project
WWW::Freshmeat::Project(3pm) User Contributed Perl Documentation WWW::Freshmeat::Project(3pm)NAME
WWW::Freshmeat::Project - retrieve project information
WWW::Freshmeat::Project methods
The "WWW::Freshmeat::Project" object provides some of the fields from the freshmeat.net entry through the following methods
url_project_page
URL of project page on Freshmeat
url_homepage
deprecated
projectname_full
desc_short
desc_full
license
trove_id
Removed.
projectname_short
www_freshmeat
Additionally, it provides the following "higher-level" methods:
name
description
Return either "projectname_full" (respectively "desc_full") or "projectname_short" (respectively "desc_short") if the former is empty.
version
Returns the version of the latest release.
url Removed.
"url_homepage" returns a freshmeat.net URL that redirects to the actual project's home page. This url() method tries to follow the
redirection and returns the actual homepage URL if it can be found, or the URL to the freshmeat.net entry for the project.
branches
Removed.
List of branches for project. Returns hash in form of (branch id => branch name).
popularity
Removed.
Freshmeat popularity data for project. Returns hash with keys record_hits, url_hits, subscribers
url_list
Removed.
url_list1
Returns list of URLs for project. Each URL is a WWW::Freshmeat::Project::URL object.
real_author
Removed.
Returns name of author (not maintainer).
release_date
Removed.
Returns date of latest release.
maintainers
Removed.
Returns list of names of maintainers.
1;
perl v5.14.2 2012-03-05 WWW::Freshmeat::Project(3pm)