Sponsored Content
Top Forums Shell Programming and Scripting how to run tail -f for 3 log files from a script Post 302569630 by dan12341234 on Tuesday 1st of November 2011 04:45:45 AM
Old 11-01-2011
how to run tail -f for 3 log files from a script

hi

i need to run from a bash script
tail -f /var/log/access_log >> access1
tail -f /var/log/prod/prod1 >> access1
tail -f /var/log/prod/prod2 >> access1

this script purpose is to start at server boot time
and should always run.

what is the best way to put it on a script

Thanks
Dan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to do a function on all files in one run

Hello everybody I am trying to write a script in Cshell solaris 8 to read a number of files and do some commands on them (for example extracting some information) and send the results to one single file. I want to do that for all the files in one run. Could any body advise me on it. Thanks and... (5 Replies)
Discussion started by: Reza Nazarian
5 Replies

2. UNIX for Dummies Questions & Answers

Constantly updating log files (tail -f? grep? awk?)

I have a log file which is continuously added to, called log.file. I'd like to monitor this file, and when certain lines are found, update some totals in another file. I've played around with tail -f, grep, and awk, but can't seem to hit the right note, so to speak. The lines I'm... (0 Replies)
Discussion started by: nortonloaf
0 Replies

3. Shell Programming and Scripting

How to tail log in one script?

I have three prodcution box Prod1 Prod2 Prod3 I want to write a script which tail the log for each production box and put it into some file which I have want to tail For example Prod1 ----- TIMER IXN=MEMPUT, USR=GGu1, elapsed = 0.176 seconds. 11:41:44 AUDIT MEMPUT: member... (4 Replies)
Discussion started by: mr_harish80
4 Replies

4. Shell Programming and Scripting

perl script to check if empty files are created and delete them and run a shell script

I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies

5. Shell Programming and Scripting

Can we run tail -f for a specified time?

Hi all, I want to check a log file that gets updated very frequently, almost every second. What I want to do from a script is to check this log file 1) for a particular string 2) for a specified time while it is getting updated. And as soon as it finds that particular string the command... (4 Replies)
Discussion started by: pat_pramod
4 Replies

6. Shell Programming and Scripting

Script to read a log file and run 2nd script if the dates match

# cat /tmp/checkdate.log SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 17 22:49:00 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production FIRST_TIME NEXT_TIME... (1 Reply)
Discussion started by: SarwalR
1 Replies

7. Shell Programming and Scripting

Script to run files with an app

hello, I need help in Unix scripting I have a whole list of file name in a Input file. I need to run the command iteratively and output the result into a text file e.g While read < Input file ; do QUERY filenane done > output.txt Appreciate your help Thank you Suhas;) (8 Replies)
Discussion started by: Suhas Kurse
8 Replies

8. Shell Programming and Scripting

Joining multiple files tail on tail

I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250. I would like to join all 250 of them together tail by tail as follows. For example stat.1000 a b c d e f stat.1001 g h i j k l So that my output... (2 Replies)
Discussion started by: kayak
2 Replies

9. Shell Programming and Scripting

Read files in shell script code and run a C program on those files

HI, I am trying to implement a simple shell script program that does not make use of ls or find commands as they are quite expensive on very large sets of files. So, I am trying to generate the file list myself. What I am trying to do is this: 1. Generate a file name using shell script, for... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

10. UNIX for Dummies Questions & Answers

Run script on multiple files

Hi Guys, I've been having a look around to try and understand how i can do the below however havent come across anything that will work. Basically I have a parser script that I need to run across all files in a certain directory, I can do this one my by one on comand line however I... (1 Reply)
Discussion started by: mutley2202
1 Replies
PON(1)								    Debian PPPD 							    PON(1)

NAME
pon, poff, plog - starts up, shuts down or lists the log of PPP connections SYNOPSIS
pon [ isp-name [ options ] ] poff [ -r ] [ -d ] [ -c ] [ -a ] [ -h ] [ isp-name ] plog [ arguments ] DESCRIPTION
This manual page describes the pon, plog and poff scripts, which allow users to control PPP connections. pon pon, invoked without arguments, runs the /etc/ppp/ppp_on_boot file, if it exists and is executable. Otherwise, a PPP connection will be started using configuration from /etc/ppp/peers/provider. This is the default behaviour unless an isp-name argument is given. For instance, to use ISP configuration "myisp" run: pon myisp pon will then use the options file /etc/ppp/peers/myisp. You can pass additional pppd options after the ISP name, too. pon can be used to run multiple, simultaneous PPP connections. pon takes the following command line options: -q --quick disconnect when ip-up finishes running. This function is only available to the root user. poff poff closes a PPP connection. If more than one PPP connection exists, the one named in the argument to poff will be killed, e.g. poff myprovider2 will terminate the connection to myprovider2, and leave the PPP connections to e.g. "myprovider1" or "myprovider3" up and running. poff takes the following command line options: -r causes the connection to be redialed after it is dropped. -d toggles the state of pppd's debug option. -c causes pppd(8) to renegotiate compression. -a stops all running ppp connections. If the argument isp-name is given it will be ignored. -h displays help information. -v prints the version and exits. If no argument is given, poff will stop or signal pppd if and only if there is exactly one running. If more than one connection is active, it will exit with an error code of 1. plog plog shows you the last few lines of /var/log/ppp.log. If that file doesn't exist, it shows you the last few lines of your /var/log/syslog file, but excluding the lines not generated by pppd. This script makes use of the tail(1) command, so arguments that can be passed to tail(1) can also be passed to plog. Note: the plog script can only be used by root or another system administrator in group "adm", due to security reasons. Also, to have all pppd-generated information in one logfile, that plog can show, you need the following line in your /etc/syslog.conf file: local2.* -/var/log/ppp.log FILES
/etc/ppp/options PPPd system options file. /etc/ppp/pap-secrets System PAP passwords file. /etc/ppp/chap-secrets System CHAP passwords file. /etc/ppp/peers/ Directory holding the peer options files. The default file is called provider. /etc/chatscripts/provider The chat script invoked from the default /etc/ppp/peers/provider. /var/log/ppp.log The default PPP log file. AUTHORS
The p-commands were written by Christoph Lameter <clameter@debian.org>. Updated and revised by Philip Hands <phil@hands.com>. This manual was written by Othmar Pasteka <othmar@tron.at>. Modified by Rob Levin <lilo@openprojects.net>, with some extensions taken from the old p-commands manual written by John Hasler <jhasler@debian.org>. SEE ALSO
pppd(8), chat(8), tail(1). Debian Project July 2000 PON(1)
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy