Sponsored Content
Full Discussion: Ping bash script to file
Top Forums UNIX for Dummies Questions & Answers Ping bash script to file Post 302559715 by itkamaraj on Wednesday 28th of September 2011 03:34:05 AM
Old 09-28-2011
Code:
#!/bin/bash
outputfile="pingtestlog"$(date +%Y%m%d)
date > $outputfile
while read ip
do
 ping $ip | grep "is alive" >> $outputfile
done < ips

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ping script using Redhat and BAsh

Alright, I have being checking out various posting here trying to hack together something for a friend Needed: A script that can run in cron doing: ping of several hosts and notifying via email when they are unavailable. I am not going to post my non working messes (I am a basic... (11 Replies)
Discussion started by: edkung
11 Replies

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

3. Shell Programming and Scripting

Bash script for ping in your own subnet

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

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

5. Shell Programming and Scripting

ping with timeout bash

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

6. Shell Programming and Scripting

Bash script to send lines of file to new file based on Regex

I have a file that looks like this: cat includes CORP-CRASHTEST-BU e:\crashplan\ CORP-TEST /usr/openv/java /usr/openv/logs /usr/openv/man CORP-LABS_TEST /usr/openv/java /usr/openv/logs /usr/openv/man What I want to do is make three new files with just those selections. So the three... (4 Replies)
Discussion started by: newbie2010
4 Replies

7. Shell Programming and Scripting

Expect script brokes when Ping file save

Hi, For some reason I was needed to ping some URL and save the output to a file through Expect script, following is a very basic of that script, but it fails everytime. When I just copied the same 'ping' line to normal Terminal and run, it runs fine. Please, help. #!/bin/sh spawn ping -c 3... (1 Reply)
Discussion started by: santanu4ver
1 Replies

8. Shell Programming and Scripting

Call a Perl script within a bash script and store the ouput in a .txt file

I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients). I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Discussion started by: mecaka
6 Replies

9. Shell Programming and Scripting

Ftp bash script appends to file using cron instead of coping new file

I have a bash script that is running a mysql query and creating a csv file with a time stamp. It then uploads that to a ftp server. Everything works great when I manually run it. But then I have a cron job set to run every monday, wednesday and friday at 5am est. When the cron job runs, it... (7 Replies)
Discussion started by: akallenberger
7 Replies

10. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

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
pgfouine(1)							   User Commands						       pgfouine(1)

NAME
pgfouine - PostgreSQL log analyzer SYNOPSIS
pgfouine -file <file> [-top <n>] [-format <format>] [-logtype <logtype>] [-report [outputfile=]<block1,block2>] DESCRIPTION
-file <file> log file to analyze - read the log from stdin instead of -file -top <n> number of queries in lists. Default is 20. -format <format> output format: html, html-with-graphs or text. Default is html. -logtype <logtype> log type: syslog or stderr. Default is syslog. for stderr, you have to use the following log_line_prefix: '%t [%p]: [%l-1] ' -report [outputfile=]<block1,block2> list of report blocks separated by a comma report blocks can be: overall, hourly, bytype, slowest, n-mosttime, n-mostfrequent, n-slowestaverage, history, n-mostfrequenterrors, tsung You can add several -report options if you want to generate several reports at once -examples <n> maximum number of examples for a normalized query -onlyselect ignore all queries but SELECT -from "<date>" ignore lines logged before this date (uses strtotime) -to "<date>" ignore lines logged after this date (uses strtotime) -database <database> consider only queries on this database -user <user> consider only queries executed by this user -title <title> define the title of the reports -syslogident <ident> PostgreSQL syslog identity. Default is postgres. -memorylimit <n> PHP memory limit in MB. Default is 128. -debug debug mode -profile profile mode -help this help AUTHOR
pgfouine was written by Guillaume Smet <guillaume-pg at smet dot org>. This manpage was written by Clement Stenac <zorglub at debian dot org> for the Debian project, but may be used by others. pgfouine August 2006 pgfouine(1)
All times are GMT -4. The time now is 03:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy