Suppress the output of ping


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Suppress the output of ping
# 1  
Old 07-13-2010
Suppress the output of ping

Hi All,

I just wanted to know, is there a way to suppress the output of the following i.e. the output should not be written on the screen:

Code:
ping 10.1.23.234 -n 1

Code:
PING 10.1.23.234: 64 byte packets
64 bytes from 10.1.23.234: icmp_seq=0. time=0. ms

----10.1.23.234 PING Statistics----
1 packets transmitted, 1 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0/0/0

Thanks
# 2  
Old 07-13-2010
Code:
ping [whatever] 2>&1 >/dev/null

# 3  
Old 07-13-2010
Code:
ping 10.1.23.234 -n 1 > /dev/null 2>&1

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Need shell script to Telnet multiple node , Ping some IP and print output

Hi Team, Need shell script to Telnet multiple node , Ping some IP and print output like pass or fail. Need this script to check reachability of multiple nodes at same time. Help me. I use this but not working... Eg. in this script i need to telnet... (4 Replies)
Discussion started by: Ganesh Mankar
4 Replies

3. Shell Programming and Scripting

Need bash script to ping the servers and rename the output file each time the script is ran

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

4. Shell Programming and Scripting

How to selectively suppress perl output?

The following perl statement in a bash script consists of two substatements. I intend the first perl substatement (the assignment with glob) to get input from the preceding bash pipe, and the second perl substatement (the foreach loop) to output back to bash. However, the first perl substatement... (7 Replies)
Discussion started by: LessNux
7 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

Extracting avg latency value from ping output

Hello Everyone, Below is the output of the ping from a router. Please help with a script which extract the Avg value from the o/p (Avg here = 4, as depicted below) and put the value into a new file. Will appreciate your help dearly Router#ping 36.36.36.36 Type escape sequence to abort.... (2 Replies)
Discussion started by: sanjugab
2 Replies

7. Shell Programming and Scripting

how to suppress dd output?

I have to stop the output of dd from writing to terminal. Here is the command: sudo dd if=boot1h of="/dev/r$temp1" Here is the output: 2+0 records in 2+0 records out 1024 bytes transferred in 0.000804 secs (1273715 bytes/sec) I have tried >> log.txt but it doesn't work. Is there... (4 Replies)
Discussion started by: msf5042
4 Replies

8. Shell Programming and Scripting

how to suppress list number from history command output

i run history command and I want to eliminate the list number. So far this perl script works as long as the list is a exact 3 character long. cat dd | perl -pe 's,\d{3},,' 70 export JAVA_HOME=. 81 export JAVA_HOME=. 82 export JAVA_HOME=`pwd` export JAVA_HOME=`pwd` ... (1 Reply)
Discussion started by: soemac
1 Replies

9. Shell Programming and Scripting

flags to suppress column output, # of rows selected in db2 sql in UNIX

Hello, I am new to db2 SQL in unix so bear with me while I try to explain the situation. I have a text file that has the contents of the where condition that I am using for a db2 SQL in UNIX ksh. Here is the snippet. if ; then echo "Begin processing VALUEs" ... (1 Reply)
Discussion started by: jerardfjay
1 Replies

10. Shell Programming and Scripting

Ping: redirect output and error

Hi, I use this function (now modified with elif) for check if a pc is up: check_pc() { $PING $PC 1 2> /dev/null if ; then check_dir #Other function echo "Begin backup operation for $PC" echo "$SMBTAR -s $PC -u $USER -p $PASS -x $SHARE$EXCL -t - | gzip -c >... (3 Replies)
Discussion started by: mbarberis
3 Replies
Login or Register to Ask a Question