Sponsored Content
Top Forums Shell Programming and Scripting How to tail -f multi logfile in 1 shell script.? Post 302801327 by ooilinlove on Wednesday 1st of May 2013 11:58:23 PM
Old 05-02-2013
Hammer & Screwdriver How to tail -f multi logfile in 1 shell script.?

Hello,

How to tail -f multi logfile from multi path in 1 shell script.

File & Path
Code:
/usr/home/localmode/mode110l/log/logic/number110/digit110_digit110m4_2013050210.txt
/usr/home/localmode/mode103l/log/logic/number103/digit103_digit103m4_2013050210.txt
/usr/home/localmode/modegwl/log/logic/number140/digit140_digitgwm10_2013050210.txt
/usr/home/localmode/modegwl/log/logic/number102/digit102_digitgwm10_2013050210.txt

I need output as below
tail -f log file in 1 shell script and 1 wondow
O/P:

Code:
tail-f /usr/home/localmode/mode110l/log/logic/number110/digit110_digit110m4_2013050210.txt
2013-05-02 10:56:09,465|1|
2013-05-02 10:56:09,689|1|
2013-05-02 10:56:09,902|1|
2013-05-02 10:56:09,915|1|

------------------------------------------------------------------------------------------
tail-f /usr/home/localmode/mode103l/log/logic/number103/digit103_digit103m4_2013050210.txt
2013-05-02 10:56:10,067|1|
2013-05-02 10:56:10,129|1|
2013-05-02 10:56:10,131|1|

------------------------------------------------------------------------------------------
tail-f /usr/home/localmode/modegwl/log/logic/number140/digit140_digitgwm10_2013050210.txt
2013-05-02 10:56:10,895|1|
2013-05-02 10:56:11,283|1|
2013-05-02 10:56:11,881|1|
2013-05-02 10:56:14,072|3|
2013-05-02 10:56:15,323|1|
2013-05-02 10:56:15,528|1|
2013-05-02 10:56:15,578|1|

------------------------------------------------------------------------------------------
tail-f /usr/home/localmode/modegwl/log/logic/number102/digit102_digitgwm10_2013050210.txt
2013-05-02 10:56:15,604|1|
2013-05-02 10:56:15,628|1|
2013-05-02 10:56:15,768|1|

------------------------------------------------------------------------------------------

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Korn Shell Script to find out error in logfile

Hi All, I am new to this forum as well as to unix scripting. Can you please help me to create a korn shell script to find out errors in logfiles and get the name of that logfile ( which is having error) in email and email it to me? (2 Replies)
Discussion started by: jithu
2 Replies

2. Shell Programming and Scripting

Grep or Tail in shell script

Hi, I am writing a shell script that checks catalina logs on a production system and mails me if it detects errors. It greps the logs for known errors which i have defined as variables. The problem is the logs are huge, approx 30,000 before they rotate. So I am forced to use grep instead... (3 Replies)
Discussion started by: Moxy
3 Replies

3. Shell Programming and Scripting

Reading multi lines variable using shell script

Hi, I am using #!/bin/sh shell. I have a variable which contains multi line data. I want to read that variable line by line. Can someone post the code to read the multi line variable line by line? Any help is much appreciated. (2 Replies)
Discussion started by: gupt_ash
2 Replies

4. Shell Programming and Scripting

generate logfile in a shell script

Unix Gurus, I have a shell script which has few "echo" statements. I am trying to create a logfile where all the outputs of the echo statement sare stored. I will have to add this as the final step in the existing script so that everytime the script runs, a logfile is generated with all the... (1 Reply)
Discussion started by: shankar1dada
1 Replies

5. Shell Programming and Scripting

How to tail -f logfile. if log file is generate every 1 HR.?

Hello, How to tail -f logfile. if log file is gennerate every 1 HR. I want it works automatically all the time. never changes it by manual. Thank ls -trl CybertonTransaction.* -rw-r--r-- 1 autobot robot 617071 Jul 9 00:02 CybertonTransaction.20130709-00.log -rw-r--r-- 1 autobot ... (12 Replies)
Discussion started by: ooilinlove
12 Replies

6. UNIX for Dummies Questions & Answers

Shell script to email logfile

Hi, I am trying to write a shell script to send a log file of a query run in oracle.Pls help me I am very new to shell scripting. echo " Checking Activity Spec " sqlplus / as sysdba <<END_SQL @activity_spec_metadata.sql quit;>>logfile END_SQL mailx -s "Checking Activity Spec schedule... (1 Reply)
Discussion started by: Rossdba
1 Replies

7. Shell Programming and Scripting

Logfile monitoring with logfile replacement

Bonjour, I've wrote a script to monitor a logfile in realtime. It is working almost perfeclty except for two things. The script use the following technique : tail -fn0 $logfile | \ while read line ; do ... some stuff done First one, I'd like a way to end the monitoring script if a... (3 Replies)
Discussion started by: Warluck
3 Replies

8. Shell Programming and Scripting

Shell script, sftp logfile not showing transfer information

Hello, Recently I have changed some crontab scripts which I execute to do different tasks mainly transfering some files from one server to the other. The main change was the protocol from ftp transfer to sftp. Ftp server was the MS Windows default service, and Sftp server is an proprietary sw... (4 Replies)
Discussion started by: enux
4 Replies

9. UNIX for Beginners Questions & Answers

Merge multi-lines into one single line using shell script or Linux command

Hi, Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line. *****Original Log***** 087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;... (3 Replies)
Discussion started by: rajeshlinux2010
3 Replies

10. UNIX for Beginners Questions & Answers

Shell script to tail a file with unknown numbers

Hello, I would like to write script to tail a file for different environment But the number of lines are keep changing How can I write a script For example: env could : A, B or C and log files could be a.log, b.log and c.log with the number of lines can change say sometimes it 100 last... (9 Replies)
Discussion started by: encrypt_decrypt
9 Replies
BINFMT.D(5)							     binfmt.d							       BINFMT.D(5)

NAME
binfmt.d - Configure additional binary formats at boot SYNOPSIS
/etc/binfmt.d/*.conf /run/binfmt.d/*.conf /usr/lib/binfmt.d/*.conf DESCRIPTION
systemd uses files from the above directories to configure additional binary formats to register during boot in the kernel. CONFIGURATION FORMAT
Each file contains a list of binfmt_misc kernel binary format rules. Consult binfmt_misc.txt[1] for more information on registration of additional binary formats and how to write rules. Empty lines and lines beginning with ; and # are ignored. Note that this means you may not use ; and # as delimiter in binary format rules. Each configuration file is named in the style of <program>.conf. Files in /etc/ overwrite files with the same name in /usr/lib/. Files in /run overwrite files with the same name in /etc/ and /usr/lib/. Packages should install their configuration files in /usr/lib/, files in /etc/ are reserved for the local administration, which possibly decides to overwrite the configurations installed from packages. All files are sorted by filename in alphabetical order, regardless in which of the directories they reside, to ensure that a specific configuration file takes precedence over another file with an alphabetically later name. EXAMPLE
Example 1. /etc/binfmt.d/wine.conf example: # Start WINE on Windows executables :DOSWin:M::MZ::/usr/bin/wine: SEE ALSO
systemd(1), wine(8) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer NOTES
1. binfmt_misc.txt http://www.kernel.org/doc/Documentation/binfmt_misc.txt systemd 10/07/2013 BINFMT.D(5)
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy