06-13-2003
Well try it the way I posted it first.. feeding the echo command into the mail command.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all...I'm new to Unix and learning. What I'm trying to create is a script that will ping a known range of IP addresses, say 192.168.1.1 to 192.168.1.254. For each address that no reply is received, that address will be written to a log file that will be emailed to an administrator. My wife... (1 Reply)
Discussion started by: spmitchell
1 Replies
2. Shell Programming and Scripting
I have a question for one who wants to help me.
I want to create a bash script to ping IP-adresses. It must first ask me the beginnen IP, then the ending IP like: 192.168.100.1 - 192.168.100.255.
When nothing is filled in, then it must find my subnet and ping that, like when my ip is... (14 Replies)
Discussion started by: ugurgazi
14 Replies
3. UNIX for Dummies Questions & Answers
Hello:
I have this script:
#!/bin/bash
#for loop
for ip in `cat ips`
do
ping $ip | grep "is alive">>pingtestlog
done
And its working properly with this input:
ericadm@amxcruas1> cat ips
10.196.60.4
10.196.61.210
10.196.62.73
10.196.61.152 (5 Replies)
Discussion started by: asenav1
5 Replies
4. Shell Programming and Scripting
Hi,
I develop simple animation ping script on Solaris Platform. It is like Cisco ping.
Examples and source code are below.
bash-3.00$ gokcell 152.155.180.8 30
Sending 30 Ping Packets to 152.155.180.8
!!!!!!!!!!!!!.!!!!!!!!!!!!!!!.
% 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies
5. Shell Programming and Scripting
Hi. I have a server with multiple network ports that need to be tested to a list of destinations. I'm trying to write a scripts to automate this but can't seem to get past an error and could use some help.
I have two test files one contains the ip addresses of the onboard NICs and the other... (10 Replies)
Discussion started by: mikez104
10 Replies
6. Shell Programming and Scripting
HI,
I have a file serverlist in that all host names are placed.
i have written a small script
#./testping
#! /bin/bash
for i in `cat serverlist`
do
ping $i >> output.txt
done
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies
7. Shell Programming and Scripting
Hi experts:
I want to do below thing with bash
if ping 192.168.0.1 sucussful then do somthing without delay, if ping failed within 20s, then kill ping and exit
not sure this can use "alarm" to do this.
any code will be welcome
Thanks (1 Reply)
Discussion started by: yanglei_fage
1 Replies
8. Shell Programming and Scripting
hello fellows,
I need help with a script, I'm using this one
HOSTS="192.168.10.9 192.168.10.15 "
SUBJECT="Attention - Gateway San Martin DOWN "
COUNT=1
EMAILID="lmail@mydomain.com"
for myHost in $HOSTS
do
count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2... (2 Replies)
Discussion started by: lucas.fradusco
2 Replies
9. Programming
help with bash script!
im am working on this script to make sure my server will stay online, so i made this script..
HOSTS="192.168.138.155"
COUNT=4
pingtest(){
for myhost in "$@"
do
ping -c "$COUNT" "$myhost" &&return 1
done
return 0
}
if pingtest $HOSTS
#100% failed... (4 Replies)
Discussion started by: mort3924
4 Replies
10. Shell Programming and Scripting
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Discussion started by: siegfried
3 Replies
LEARN ABOUT LINUX
shtool-echo
SHTOOL-ECHO.TMP(1) GNU Portable Shell Tool SHTOOL-ECHO.TMP(1)
NAME
shtool-echo - GNU shtool echo(1) extensional command
SYNOPSIS
shtool echo [-n|--newline] [-e|--expand] string
DESCRIPTION
shtool echo is an echo(1) style command which prints string to stdout and optionally provides special expansion constructs (terminal bold
mode, environment details, date, etc) and newline control. The trick of this command is that it provides a portable -n option and hides the
gory details needed to find out the environment details under option -e.
OPTIONS
The following command line options are available.
-n, --newline
By default, output is written to stdout followed by a "newline" (ASCII character 0x0a). If option -n is used, this newline character is
omitted.
-e, --expand
If option -e is used, string can contain special "%x" constructs which are expanded before the output is written. Currently the
following constructs are recognized:
%B switch terminal mode to bold display mode.
%b switch terminal mode back to normal display mode.
%u the current user name.
%U the current user id (numerical).
%g the current group name.
%G the current group id (numerical).
%h the current hostname (without any domain extension).
%d the current domain name.
%D the current day of the month.
%M the current month (numerical).
%m the current month name.
%Y the current year.
EXAMPLE
# shell script
shtool echo -n -e "Enter your name [%B%u%b]: "; read name
shtool echo -e "Your Email address might be %u@%h%d"
shtool echo -e "The current date is %D-%m-%Y"
HISTORY
The GNU shtool echo command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1998 for Website META Language (WML)
under the name buildinfo. It was later taken over into GNU shtool.
SEE ALSO
shtool(1), echo(1).
18-Jul-2008 shtool 2.0.8 SHTOOL-ECHO.TMP(1)