Sponsored Content
Top Forums Shell Programming and Scripting How can i merge these two files into several... Post 302462666 by Y-T on Thursday 14th of October 2010 06:03:43 PM
Old 10-14-2010
wow. thank you! that was fast. and works! you saved me a lot of time...
May i ask a second question?
How can i have the new file named like the added line? So that it is not File1, but "AAA" as filename?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to merge files

Hello guys, I gotta question, i have a lot of log files (simple text) and i need to merge them in group of 10 files, one next to the other, that have sense? For example, i have the files: File1 File2 File3 File4 . . File100 I need to merge the contents of each file into a new file... (3 Replies)
Discussion started by: lestat_ecuador
3 Replies

2. Shell Programming and Scripting

merge files

Hi, i have the files f1 and f2 like: files f1: c1 a1 c2 a2 c3 a3 file f2: c1 b1 c2 b2 c3 b3 i want merge the f1 and f2 file to f3 file like: c1 a1 b1 c2 a2 b3 c3 a3 b3........ .... . . please help me onthis..... (5 Replies)
Discussion started by: koti_rama
5 Replies

3. Shell Programming and Scripting

Merge files of differrent size with one field common in both files using awk

hi, i am facing a problem in merging two files using awk, the problem is as stated below, file1: A|B|C|D|E|F|G|H|I|1 M|N|O|P|Q|R|S|T|U|2 AA|BB|CC|DD|EE|FF|GG|HH|II|1 .... .... .... file2 : 1|Mn|op|qr (2 Replies)
Discussion started by: shashi1982
2 Replies

4. Shell Programming and Scripting

Merge 2 files

Hello, i'd like a bash script to merge 2 files without duplicate lines. Example : file1 : toto titi file2 : toto tata Expected result, file3 : toto (5 Replies)
Discussion started by: Celmar
5 Replies

5. Shell Programming and Scripting

Merge 2 files

Hi , This might be the stupidest question I am asking, but I am struck with this problem. I am trying to merge 2 files, file1 has header and file2 has contents. while I merge them , it merges from the 1st line of file1. for ex: file1 col1|col2|col3| file2 123|234|456|... (2 Replies)
Discussion started by: rashmisb
2 Replies

6. Shell Programming and Scripting

MERGE FILES

Hi all! How could I merge all the text files (in format xml) of a single folder, after having deleted from each of them all the text from its beginning up to a specific string: "<body>" ? Thanks a lot! mjomba (4 Replies)
Discussion started by: mjomba
4 Replies

7. UNIX for Dummies Questions & Answers

Merge files

Hi, I would like to know how can I merge files based on their coordinates, but mantaining the score of each file in the output file like: Note: 1st column is for chromosome, 2nd for start, 3rd for end of segment, 4th for score file1: 1 200 300 20 1 400 500 30 file2: 1 200 350 30 1... (1 Reply)
Discussion started by: fadista
1 Replies

8. Shell Programming and Scripting

Checking in a directory how many files are present and basing on that merge all the files

Hi, My requirement is,there is a directory location like: :camp/current/ In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Discussion started by: srikanth_sagi
10 Replies

9. Shell Programming and Scripting

Merge files and generate a resume in two files

Dear Gents, Please I need your help... I need small script :) to do the following. I have a thousand of files in a folder produced daily. I need first to merge all files called. txt (0009.txt, 0010.txt, 0011.txt) and and to output a resume of all information on 2 separate files in csv... (14 Replies)
Discussion started by: jiam912
14 Replies

10. Shell Programming and Scripting

How to merge two files?

Dear Frens, I have two files and need to merge into one file. Like File_1: Field1 Field2 1 4 File_2: Field1 Field2 3 5 I need one single output as File_1: Field1 Field2 1 4 3 5 This means taking header from either file. (8 Replies)
Discussion started by: manisha_singh
8 Replies
lwatch(1)						      General Commands Manual							 lwatch(1)

NAME
lwatch -- syntax highlighting for syslog/syslog-ng file SYNOPSIS
lwatch [-C filename] [--config filename] [-i filename] [--input filename] [-o filename] [--output filename] [-sdOhv] [--show- unparsed] [--daemon] [--omit-rc] [--help] DESCRIPTION
Lwatch is a log colorizer. It reads syslog/syslog-ng data from named fifo or from stdin and displays colored logs into stdout. Lwatch is highly user-customizable. It reads configuration data from the file /etc/lwatch/lwatch.conf or (if given) from the file provided with option -C The way it works is simple. It reads a line from input (build-in default is /var/lib/lwatch/syslog.fifo), splits it into four parts: date, hostname, service name (with PID, if available) and real message. Each part has its own default color. You can redefine them in configura- tion file. Default colors as the same as in loco(1) [see: http://www.zjuul.net/~jules/loco/]. But lwatch is not only a static log col- orizer. It is something more. It can colorize your logs any way you wish. You are able to set a new color for any part (date, host, ser- vice, message) using regexp based patterns. COMMAND LINE OPTIONS
Lwatch accepts some command line options. Command line options have precedence over values from configuration file. -C filename --config filename read config from filename instead of /etc/lwatch/lwatch.conf -i filename --input filename read data from named fifo filename instead of /var/lib/lwatch/syslog.fifo -o filename --output filename write colored logs to filename instead stdout -s --show-unparsed show unparsed lines like `last message repeated 5 times' or `--- MARK ---' -d --daemon run as daemon, detach from control terminal, move to background -O --omit-rc do not read values from config file -h --help show help about runtime option -v --version show version and copyright notices RUNNING
Preferred way to run lwatch is to read syslog messages from named fifo or from standard input. If you use syslog you really want to read messages from named fifo. To do it, put a line: *.* |/var/lib/lwatch/syslog.fifo in your syslog.conf. Create appropriate fifo and restart syslog, then run lwatch. You can also run lwatch before starting syslog. If you don't know how to create named fifo see mknod(1) for details. Remember: o fifo must exist o proper name must be put in /etc/lwatch/lwatch.conf or given with -i command line option In syslog-ng you can run lwatch directly from syslog, i.e.: log { source(src); destination(console_all);}; destination console_all {program("/usr/bin/lwatch -i- -o/dev/tty11"); }; Lwatch does not support reading from regular files. If you really need this functionality use following command: tail -f /path/to/filename | /usr/bin/lwatch -i- It could be subject to change in the future. RESOURCES
o http://sf.net/projects/lwatch o http://freshmeat.net/projects/lwatch/ COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the University of Cambridge, England. This library is available at: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ NOTE FROM AUTHOR
I have written this tool for my own needs because perl tools, however flexible, eated a lot of memory and CPU. I have found it useful and I share it with the Open Source Community. But still, developing of this software is driven by my own needs. So, you could expect next release in a year or two ;) It would be really nice if you could find some time and spare it for rating this project on FreshMeat (see RESOURCES). Comments are welcome too. I cannot promise that I will add new features to lwatch immediately but any positive feedback will raise my motivation level up. Thank you in advance for your time. SEE ALSO
lwatch.conf(5) lwatch(1)
All times are GMT -4. The time now is 06:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy