Sponsored Content
Full Discussion: Ping file with ip address
Top Forums UNIX for Dummies Questions & Answers Ping file with ip address Post 302245165 by joeyg on Thursday 9th of October 2008 01:41:49 PM
Old 10-09-2008
Hammer & Screwdriver Unsure of your scripting or datafile layout

Take a look at the following input file and execution script. (I specifically call the ping command in my example.)

Code:
> cat ip_list
10.1.191.100
10.1.191.101
10.1.191.102
10.1.191.126

> cat auto_ping
#! /usr/bin/bash

while read ip_addr
   do
   echo $ip_addr
#   ping "$ip_addr"
   /usr/sbin/ping "$ip_addr" 10
done < ip_list
>

 

10 More Discussions You Might Find Interesting

1. AIX

Script to ping servers in a file

I would like to ping a list of servers in a text file. Can anyone help? (1 Reply)
Discussion started by: gbarkhor
1 Replies

2. Solaris

capture ping to a file

I would like to capture the output from ping into a file. I am on solaris 9. I can get the basic "server is alive" command in a file, but I want the response from ping -s into a file. I am going to schedule this in cron to run at certain times during the day. When I run the ping -s in a... (3 Replies)
Discussion started by: MizzGail
3 Replies

3. Solaris

ping with source address

Hello, is there any way to ping with source address on Solaris ? (3 Replies)
Discussion started by: marmellata
3 Replies

4. UNIX for Dummies Questions & Answers

Ping bash script to file

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

5. Shell Programming and Scripting

Animation Ping on Solaris Like Cisco Ping

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

6. Shell Programming and Scripting

PING to get ip address

I want to print the domain:ip for a list of domains in a text file. the problem is godaddy has blocked the domains so the result of a ping is like this: PING domain.com (68.178.232.99): 56 data bytes --- domain.com ping statistics --- 1 packets transmitted, 0 packets received, 100.0%... (4 Replies)
Discussion started by: vanessafan99
4 Replies

7. Shell Programming and Scripting

How to get reason for ping failure using perls Net::Ping->new("icmp");?

Hi I am using perl to ping a list of nodes - with script below : $p = Net::Ping->new("icmp"); if ($p->ping($host,1)){ print "$host is alive.\n"; } else { print "$host is unreacheable.\n"; } $p->close();... (4 Replies)
Discussion started by: tavanagh
4 Replies

8. IP Networking

Ping domain indicates the external ip address and not the local ip

when i execute from local machine ping domainname i get the external ip address but i am on local dns and i expect the local ip address.. using nslookup : no problem so i cannot find why... thanks (2 Replies)
Discussion started by: activedms
2 Replies

9. Programming

Ping test sends mail when ping fails

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. UNIX for Beginners Questions & Answers

Ping certain range of ip address

hey guys, In my program i am giving an initial ip & end ip. i just want to check every ip in that range is pingable or not echo "Enter the initial ip:" read inip echo "Enter the end ip:" read endip for (( i=0; i<=$endip; i++ )) do if ping -c 4 $inip then echo "pingable" else echo... (5 Replies)
Discussion started by: Meeran Rizvi
5 Replies
MIXERCTL.CONF(5)					      BSD File Formats Manual						  MIXERCTL.CONF(5)

NAME
mixerctl.conf -- audio mixer configuration file SYNOPSIS
mixerctl.conf DESCRIPTION
The /etc/mixerctl.conf file consists of mixerctl(1) variables to set at boot time. Each line of mixerctl.conf has the following format: variable=value To generate a mixerctl.conf from the current mixer settings, execute: mixerctl -a > /etc/mixerctl.conf Set mixerctl to YES in rc.conf(5) to have the variables set at boot time. Additionally, you can have the settings saved and restored for the devices of your choice by listing them in mixerctl_mixers in rc.conf(5). FILES
/etc/mixerctl.conf EXAMPLES
Example mixer settings for an esa(4) audio adapter: outputs.master=255,255 outputs.master.mute=off outputs.mono=255 outputs.mono.mute=on outputs.mono.source=mixerout outputs.headphones=255,255 outputs.headphones.mute=off outputs.tone=255,255 inputs.speaker=255 inputs.speaker.mute=off inputs.phone=191 inputs.phone.mute=on inputs.mic=191 inputs.mic.mute=on inputs.mic.preamp=off inputs.mic.source=mic0 inputs.line=191,191 inputs.line.mute=on inputs.cd=191,191 inputs.cd.mute=on inputs.video=255,255 inputs.video.mute=off inputs.aux=255,255 inputs.aux.mute=off inputs.dac=191,191 inputs.dac.mute=off record.source=mic record.volume=255,255 record.volume.mute=off record.mic=0 record.mic.mute=off outputs.loudness=off outputs.spatial=off outputs.spatial.center=0 outputs.spatial.depth=0 SEE ALSO
mixerctl(1), rc.conf(5) HISTORY
The mixerctl.conf configuration file first appeared in NetBSD 2.0. BSD
April 5, 2003 BSD
All times are GMT -4. The time now is 11:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy