08-29-2005
how to sed with tail
hi,
I am searching error and exception in my log and >> to report file,
my code is :
sed -n '/[eE][rR][rR][oO][rR]/p;/[eE][xX][cC][eE][pP][tT][iI][oO][nN]/p' $ARIBA_LOG_DIR/MyLog.txt >> $LOG_ERR_REP
I need to report avove 5 line, that line and bellow 5 line..
what change is required in my code?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Working in HP-UX 10.20. I eventually want to write a bourne shell script to handle the following problem, but for now I am just toying with it at the command line.
Here's what I am basically trying to do:
tail -f log_X | grep n > log_Y
I am doing a tail -f on log_X . Once it sees "n", I... (6 Replies)
Discussion started by: cdunavent
6 Replies
2. Shell Programming and Scripting
Hello all,
I have search the forum and could not find an answer...Here is what I am trying to do. Every 15 minutes, a script send uptime output to a logfile (dailylog.log), that file contains lines like the one below:
11:21am up 44 days, 19:15, 1 user, load average: 0.00, 0.02, 0.03
... (7 Replies)
Discussion started by: qfwfq
7 Replies
3. Shell Programming and Scripting
I am trying to extract a particular line from a.log which keeps appending every sec and output that into a newfile b.log which should append itself with filtered data received from a.log
I tried
tail -f a.log |grep fail| tee -a b.log
nothing in b.log
tail -f a.log |grep fail >>b.log
... (4 Replies)
Discussion started by: wannalearn
4 Replies
4. Shell Programming and Scripting
Hi,
I had few scripts which were running fine on linux:
uname -a
Linux ######### 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:33:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
from some front end application. Recently there was a migration of this application on some other linux m/c:
uname -a... (4 Replies)
Discussion started by: dips_ag
4 Replies
5. UNIX for Advanced & Expert Users
Can anyone explain the below sed oneliner?
sed -e ':a' -e '$q;N;11,$D;ba'
It works same as tail command.
I just want to know how it works.
Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies
6. Shell Programming and Scripting
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
7. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix.
In this forum some days back, I have read something like below:
1) Do not use perl if awk can do your work.
2) Do not use awk if sed can do your work.
.
.
.
I do not re-collect the whole thing. I think it is good to know the precedence of using these... (2 Replies)
Discussion started by: Prathmesh
2 Replies
8. Shell Programming and Scripting
because the tail +2 on the first line gives me the file name pomga I do not want anything like what I miss
tail +2 ejemplo.txt
ouput
==> ejemplo.txt <==
1
2
3
4
5
6
7
8
9
10 (2 Replies)
Discussion started by: tricampeon81
2 Replies
9. Shell Programming and Scripting
Hello,
I am trying to create an iptables script with tail ,sed and awk.
1st Request: Search keyword "secret" in access.log file
2nd Request: Get first column matching lines (ip address)
3rd Request: Save it to a file
This is what I did so far:
grep.sh
#!/bin/bash
while true;
do
tail... (23 Replies)
Discussion started by: baris35
23 Replies
10. UNIX for Beginners Questions & Answers
Hi Team,
Can anyone help me here:
I have to access server logs via putty and these logs file is a trailing file (continously updating) with ERROR and WARNINGS... I need to know if I can pull this trailing file to a local drive so that I can do some higlighting on some keywords through Notepad... (13 Replies)
Discussion started by: jitensetia
13 Replies
MFT(1) General Commands Manual MFT(1)
NAME
mft - translate Metafont code to TeX code for prettyprinting
SYNOPSIS
mft mf_file_name[.mf] [ [ -c ] or [ change_file_name[.ch] ] ] [ [ -s ] or [ style_file_name[.mft] ] ]
DESCRIPTION
This manual page is not meant to be exhaustive. The complete documentation for this version of TeX can be found in the info file or manual
Web2C: A TeX implementation.
The mft program creates a TeX file from a Metafont program. It takes appropriate care of typographic details like page layout and the use
of indentation, italics, boldface, etc., as illustrated in the book Computer Modern Typefaces. Special conventions in Metafont comments
allow you to control things that would not otherwise come out right; section 1 of the MFT source program in the Metafontware report
explains these rules.
The command line has one required file name and two optional file names. The required one is a Metafont source file; there is also an
optional change file (which works just as the change files to tangle(1) and weave(1) do) and an optional style file (which is prepended to
everything).
A file name that doesn't contain a dot is always given an extension, either .mf (Metafont) or .ch (change) or .mft (style). If no style
file is specified, the style file plain.mft is automatically used. The change_file_name is not searched for using any paths. The .mf file
is searched for using the MFINPUTS environment variable if you have set it, or else the system default. The style file is searched for
using the TEXINPUTS environment variable. See tex(1) for the details of the searching.
The output TeX file name is formed by using .tex in place of the extension of mf_file_name.
OPTIONS
Specify command-line options -c to suppress the reading of a change file, and -s to suppress the reading of a style file.
FILES
mftmac.tex
TeX macros used by mft output.
plain.mft
Default style file.
cmbase.mft
Style file for Computer Modern.
SEE ALSO
mf(1), weave(1).
Donald E. Knuth, Computer Modern Typefaces (Volume E of Computers and Typesetting), Addison-Wesley, 1986, ISBN 0-201-13446-2.
Donald E. Knuth et al., Metafontware.
AUTHORS
Donald E. Knuth wrote the program, and he ported it to Unix with the help of Pierre MacKay and the Unix port of weave by Howard Trickey and
Pavel Curtis. The program is published in the Metafontware technical report, available from the TeX Users Group.
Web2C 7.3.1 14 December 1993 MFT(1)