Hi all,
I need help in following scenario. I have a file with about 10,000 lines. There are several lines which have word "START" (all upper case) in them. I want to grep line with word "START" and then do the following
1. Print the line number having word "START"
2. Print the next 11 lines.
... (4 Replies)
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
hello,
I go text file like this
E:/DDD/Dyndede/wwww
E:/DDD/sss.com/ffffg/fff
E:/DDD/vvvvvv/dd
E:/DDD/sss.com/bbbbbb
E:/DDD/sss.com/nnnn/xxI want to print
/alpha.jpg at the end of every lines like that
E:/DDD/Dyndede/wwww/alpha.jpg
E:/DDD/sss.com/ffffg/fff/alpha.jpg... (8 Replies)
Hi all,
This should be very easy but I can't figure it out...
I have a file that looks like this:
@SRR057408.1 FW8Y5CK02R652T length=34
AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT
+SRR057408.1 FW8Y5CK02R652T length=34
FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8
@SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Hi
I have this in my file
2011-04-18 15:32:11 system-alert-00012: UDP flood! From xxxxxx to yyyyyyyyyy, int ethernet0/2). Occurred 1 times.
2011-04-18 15:32:11 system-alert-00012: UDP flood! From xxxxxx to yyyyyyyyyy, int ethernet0/2). Occurred 1 times.
2011-04-18 15:32:11... (9 Replies)
RHEL 5.8
I have a text file like below. I want to grep for a string and then print the next 4 lines including the line with the string I grepped for
For eg:
I want grep for the string HANS and then print the next 4 lines including HANS
$ cat someText.txt
JOHN
NATIONALITY:... (7 Replies)
FMT(1) General Commands Manual FMT(1)NAME
fmt, htmlfmt - simple text formatters
SYNOPSIS
fmt [ option ... ] [ file ... ]
htmlfmt [ -a ] [ -c charset ] [ -u url ] [ file ... ]
DESCRIPTION
Fmt copies the given files (standard input by default) to its standard output, filling and indenting lines. The options are
-l n Output line length is n, including indent (default 70).
-w n A synonym for -l.
-i n Indent n spaces (default 0).
-j Do not join short lines: only fold long lines.
Empty lines and initial white space in input lines are preserved. Empty lines are inserted between input files.
Fmt is idempotent: it leaves already formatted text unchanged.
Htmlfmt performs a similar service, but accepts as input text formatted with HTML tags. It accepts fmt's -l and -w flags and also:
-a Normally htmlfmt suppresses the contents of form fields and anchors (URLs and image files); this flag causes it to print them, in
square brackets.
-c charset
change the default character set from iso-8859-1 to charset. This is the character set assumed if there isn't one specified by the
html itself in a <meta> directive.
-u url Use url as the base URL for the document when displaying anchors; sets -a.
SOURCE
/src/cmd/fmt.c
/src/cmd/htmlfmt
BUGS
Htmlfmt makes no attempt to render the two-dimensional geometry of tables; it just treats the table entries as plain, to-be-formatted text.
FMT(1)