Sponsored Content
Top Forums Shell Programming and Scripting HELP: check if website is on, if not email Post 302231102 by fberbert on Monday 1st of September 2008 05:20:32 PM
Old 09-01-2008
Try this one:

if ! ping -c 1 yourhost | grep 'bytes from' > /dev/null
then
echo mail command here...
fi


--
Fabio Berbert de Paula
Viva o Linux - A maior comunidade de usuários Linux do Brasil!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do I check using shell-script if a website is available / responding?

Hi, Could someone please help. How do I verify using a shell script whether a website URL is available? It's roughly the URL equivalent of ping <servername> or tnsping <Oracle database name>? I hope this is enough information - please let me know if it's not. Many thanks, Neil (3 Replies)
Discussion started by: Neil_mw
3 Replies

2. Shell Programming and Scripting

how to check body of the email

Dears, i have user called dellsh i hope to make this script when this user recieve email check the budy of the email about (StatusRequest) when i find this email contain this subject run crontab do this job (create file in my home directory called index) thanks for your attention (1 Reply)
Discussion started by: dellsh
1 Replies

3. Shell Programming and Scripting

Need to check POP3 email

Hey there! I have this problem: i'm in need to check the subject from e-mails from some generic account. This subjects are used as parameters for some program. The thing is, i can do the second, but not the first. I don't know how to handle POP3 accounts from shell. Is there an application that... (1 Reply)
Discussion started by: ghorkov
1 Replies

4. Shell Programming and Scripting

Check and compare disk space and email it

I am very new to Linux and learning to script. This is for one of my servers at work that I have to keep track off as far as disk space and how it is used. I have tried to go line by line but little things keep chewing me up. I would appreciate any and all help or advice, and Mutt is installed on... (3 Replies)
Discussion started by: sgtjkj
3 Replies

5. Shell Programming and Scripting

Check email and download attachment

Hi, I had search the web for a script to download email, but failed to found one. I need a bash or perl script that will check for email originating from an address such as john@rambo.com and download the .zip attachment into a specified folder. Anyone could assist or give me some... (1 Reply)
Discussion started by: mynullvoid
1 Replies

6. Infrastructure Monitoring

Nagios Check Website Command help

Hi all, me again.... I am trying to add a website to my nagios checking juggernaught I am using the script from nagios exchange site called check_website_response (google to find it i am not allowed to post links yet, sorry) It is in /usr/local/nagios/libexec with the rest of the default... (1 Reply)
Discussion started by: Yoshi17
1 Replies

7. Web Development

Request to check:PHP website design help

Hi I have a website name www.gentrepid.org I have all the setting scripts for this website in php now as a research part, I am new to this as I havent done that before. I have to make certain changes in the website Include some icons on the left like "Drugs" when user click on it... (0 Replies)
Discussion started by: manigrover
0 Replies

8. Shell Programming and Scripting

Check Date Format And Email Out

Hello All, I have a requirement where i need to get the EXTRACT_DATE from a file and check if the date is of valid format or not and then mail it if it is not valid. Appreciate if you can help me with this. I did the following so far. awk '{for(i=1;i++<=NF;)if($i~/^EXTRACT_DATE/) print $i}'... (11 Replies)
Discussion started by: Ariean
11 Replies

9. Shell Programming and Scripting

Check email successful sent and receive

We have a unix/linux server , that send mass email from it , the emails will pass the smtp gateway , email server and sent to the client , but sometimes the client do not receive the mail , we do not know the reason and when it will happen . We would like to have a script that check when the... (2 Replies)
Discussion started by: ust4
2 Replies
NOTMUCH(1)						      General Commands Manual							NOTMUCH(1)

NAME
notmuch - thread-based email index, search, and tagging SYNOPSIS
notmuch command [args ...] DESCRIPTION
Notmuch is a command-line based program for indexing, searching, reading, and tagging large collections of email messages. This page describes how to get started using notmuch from the command line, and gives a brief overview of the commands available. For more information on e.g. notmuch show consult the notmuch-show(1) man page, also accessible via notmuch help show The quickest way to get started with Notmuch is to simply invoke the notmuch command with no arguments, which will interactively guide you through the process of indexing your mail. NOTE
While the command-line program notmuch provides powerful functionality, it does not provide the most convenient interface for that func- tionality. More sophisticated interfaces are expected to be built on top of either the command-line interface, or more likely, on top of the notmuch library interface. See http://notmuchmail.org for more about alternate interfaces to notmuch. The emacs-based interface to not- much (available under emacs/ in the Notmuch source distribution) is probably the most widely used at this time. COMMANDS
SETUP The notmuch setup command is used to configure Notmuch for first use, (or to reconfigure it later). The setup command will prompt for your full name, your primary email address, any alternate email addresses you use, and the directory con- taining your email archives. Your answers will be written to a configuration file in ${NOTMUCH_CONFIG} (if set) or ${HOME}/.notmuch-config . This configuration file will be created with descriptive comments, making it easy to edit by hand later to change the configuration. Or you can run notmuch setup again to change the configuration. The mail directory you specify can contain any number of sub-directories and should primarily contain only files with individual email mes- sages (eg. maildir or mh archives are perfect). If there are other, non-email files (such as indexes maintained by other email programs) then notmuch will do its best to detect those and ignore them. Mail storage that uses mbox format, (where one mbox file contains many messages), will not work with notmuch. If that's how your mail is currently stored, it is recommended you first convert it to maildir format with a utility such as mb2md before running notmuch setup . Invoking notmuch with no command argument will run setup if the setup command has not previously been completed. OTHER COMMANDS Several of the notmuch commands accept search terms with a common syntax. See notmuch-search-terms(7) for more details on the supported syntax. The search, show and count commands are used to query the email database. The reply command is useful for preparing a template for an email reply. The tag command is the only command available for manipulating database contents. The dump and restore commands can be used to create a textual dump of email tags for backup purposes, and to restore from that dump. The config command can be used to get or set settings int the notmuch configuration file. ENVIRONMENT
The following environment variables can be used to control the behavior of notmuch. NOTMUCH_CONFIG Specifies the location of the notmuch configuration file. Notmuch will use ${HOME}/.notmuch-config if this variable is not set. SEE ALSO
notmuch-config(1), notmuch-count(1), notmuch-dump(1), notmuch-hooks(5), notmuch-new(1), notmuch-reply(1), notmuch-restore(1), notmuch- search(1), notmuch-search-terms(7), notmuch-show(1), notmuch-tag(1) The notmuch website: http://notmuchmail.org CONTACT
Feel free to send questions, comments, or kudos to the notmuch mailing list <notmuch@notmuchmail.org> . Subscription is not required before posting, but is available from the notmuchmail.org website. Real-time interaction with the Notmuch community is available via IRC (server: irc.freenode.net, channel: #notmuch). Notmuch 0.13.2 2012-06-01 NOTMUCH(1)
All times are GMT -4. The time now is 04:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy