Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ping to machine and count responses Post 47288 by oombera on Friday 6th of February 2004 11:38:36 AM
Old 02-06-2004
/etc/hosts isn't a directory, so here's what I'd do (just one possibility):
Code:
if [ -e "$1" ]; then
  awk '$1 != "" && $1 != "#" {print $1}' "$1" |
  while read COMP; do
    ping -c 1 "$COMP"
  done
fi

 

10 More Discussions You Might Find Interesting

1. HP-UX

ping Port number of HPUX machine

I have 2 HPUX machines. Let say machine A and B. In HPUX machine A, I would like to ping the port number of machine B. Is there any command or any HPUX freeware available? In windows, I can use some freeware to ping port to any type of machines (e.g. HPUX, Windows and etc). See URL below. ... (1 Reply)
Discussion started by: Teh Tiack Ein
1 Replies

2. Shell Programming and Scripting

Extracting Latency, Loss and Jitter from PING responses.

I have a script that pings several hosts and stores the response in a text file (see below) Once this file is created, the intention is to populate a database with the values for 'packet loss', 'avg' and 'mdev', but first I have to extract this data. avg=latency mdev = jitter packet... (5 Replies)
Discussion started by: tony.kandaya
5 Replies

3. IP Networking

Unable to ping freebsd machine using fully qualified domain name

hi all. am unable to ping a freebsd machine using fully qualified domain name from a windows machine. i have already set the fqdn for the machine. plz advise me. thanks. (2 Replies)
Discussion started by: coolatt
2 Replies

4. Programming

Ping remote UNIX machine from a java application

Hi Friends, Can some one please guide me on how to make a script run on a remote UNIX machine from a java application. Or may if you can just tell me how do u ping to the remote UNIX machine using java code. Been looking for the solution since 5-6 hrs, didn't got any where near :( Thanks. (1 Reply)
Discussion started by: Sanjay MD
1 Replies

5. SuSE

unable to ping virtualbox machine

I current have Windows 7 running Virtualbox - OpenSUSE. From SUSE I can ping the Windows box 10.10.x.x no problems. But from the windows box I can't ping SUSE. I have tried disabling the firewall and sill no luck. Tried pinging host name and still no luck. The network gives an IP from... (2 Replies)
Discussion started by: woofie
2 Replies

6. Solaris

Not able to connect (ping & http) to windows 2003 (with IIS installed) from Solaris9 Machine(Tomcat)

hi Am trying to connect from Solaris 9 installed Sun server and having Tomcat 5.5.9 installed on top of it to Windows 2003 server with IIS installed for web application. Scenarios am facing are 1. From Sun system am able to ping and telnet ip with port 80 of windows 2000 system which is... (2 Replies)
Discussion started by: aemunathan
2 Replies

7. Solaris

not able to ping base OS from virtual machine

I have a vista on my PC . I have created a Solaris 10 server on it using VM ware . I have selected bridge mode to connect my PC and virtual machine together .I have alloted ip 192.168.1.2 to my virtual machine and 192.168.1.11 to my PC . I am able to ping the virtual machine from the base machine... (1 Reply)
Discussion started by: asalman.qazi
1 Replies

8. Shell Programming and Scripting

Count time min/max/average for ping

I am redirecting my ping output to a file. The sample output is like this: 64 bytes from xx.xx.xx.167: icmp_seq=4490 ttl=116 3.75 ms 2011Jul12- 15 40 16 64 bytes from xx.xx.xx.167: icmp_seq=4491 ttl=116 5.29 ms 2011Jul12- 15 40 17 64 bytes from xx.xx.xx.167: icmp_seq=4492 ttl=116 4.88 ms... (6 Replies)
Discussion started by: zorrox
6 Replies

9. Red Hat

Total HDD size and count on Linux machine

Hi... I am trying to grab two information 1. Total size of HDD 2. Total number of HDD (if possible alongwith names) can someone suggest me how can we do that in linux machine.. though small scripts and commands like fdisk. (3 Replies)
Discussion started by: omkar.jadhav
3 Replies

10. IP Networking

Cant ping Linux machine from Windows

Hi I have established LAN with the help of D-Link router. I am having 2 desktops ethernet connection managed by this D-Link router. One PC is with Windows 7 OS Second PC is with Redhat Linux 6.1 Both the PCs now stands connected to internet via this D-Link router. I could ping windows PC... (12 Replies)
Discussion started by: videsh77
12 Replies
Locale::Codes::LangExt(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangExt(3pm)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangExt(3pm)
All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy