![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding specific text and spaces to each line in a text file | hertingm | Shell Programming and Scripting | 4 | 08-25-2008 03:34 PM |
| parse through one text file and output many | sophiadun | UNIX for Dummies Questions & Answers | 14 | 02-20-2008 06:08 AM |
| Extract text in 2 columns of output file. | Danish Shakil | Shell Programming and Scripting | 2 | 10-19-2007 11:03 AM |
| I want to copy the text output from a 'nohup.out' file. | Iamthe great | UNIX for Dummies Questions & Answers | 3 | 05-01-2007 01:41 PM |
| grep multiple text files in folder into 1 text file? | coppertone | UNIX for Dummies Questions & Answers | 7 | 08-23-2002 03:50 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Ping text file of ip addressese and output to text file
I am basically a scripting noob, I have some programming logic, and I wouldn't post here if my 3 hours of searching actually found something.
So far this is what I have: " #! /bin/ksh List=./pinglist1.txt cat $List | while read ip do Pingable="" ping $ip -n 2 | awk '/100%/ {print "no"}' |read Pingable if [[ "$Pingable" != "no" ]] then print $ip "PINGS">>pingresults.txt else print $ip "DOESN'T PING">>pingresults.txt fi done " pinglist1.txt is just a plain file with IP addresses. I just want the script to ping each IP address and report if it is pinging or not to a text file. Please and thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|