Hi,
Please suggest how to write a shell script which delets all the lines containing the word unix in the files supplied as argument in the shell. (4 Replies)
Hi all coders,
I need a help to process some data.
I have this file,
3 09/21/08 03:32:07 started undef mino Oracle nmx004.wwdc.numonyx.co
m
Message Text : The Oracle session with the PID 1103 has a CPU time
consuming of 999.00... (3 Replies)
Input:
a
b
b
c
d
d
I need:
a
c
I know how to get this (the lines that have duplicates) :
b
d
sort file | uniq -d
But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Let's say we have a file containing:
alllllsadfsdasdf
qwdDDDaassss
ccxxcxc#2222
dssSSSSddDDDD
D1Sqn2NYOHgTI
Hello
Alex
ssS@3
Ok, and let's say we want to delete all words from D1Sqn2NYOHgTI and back, this means
to delete the words (and the lines of them) :
alllllsadfsdasdf... (2 Replies)
Hello,
I have a group of text files with many lines in each file.
I need to delete all the lines in each and only leave 2 lines in each file. (3 Replies)
Hi,
I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this:
Records
P1
10,23423432
,77:1
,234:2
P2
10,9089004
,77:1
,234:2
,87:123
,9898:2
P3
456456
P1
:123,456456546
P2
abc:324234 (2 Replies)
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies
LEARN ABOUT MINIX
roff
is a text formatter. Its input consists of the text to be out-
put, intermixed with formatting commands. A formatting commandis a line containing the control character followed by a twocharacter command name, and possibly one or more arguments. Thecontrol character is initially . (dot). The formatted output isproduced on standard output. The formatting commands are listedbelow, with being a number, being a character, and being a title.A + before n means it may be signed, indicating a positive ornegative change from the current value. Initial values for whererelevant, are given in parentheses.
.ad Adjust right margin.
.ar Arabic page numbers.
.br Line break. Subsequent text will begin on a new line.
.bl n Insert n blank lines.
.bp +n Begin new page and number it n. No n means +1.
.cc c Control character is set to c.
.ce n Center the next n input lines.
.de zz Define a macro called zz. A line with .. ends definition.
.ds Double space the output. Same as .ls 2.
.ef t Even page footer title is set to t.
.eh t Even page header title is set to t.
.fi Begin filling output lines as full as possible.
.fo t Footer titles (even and odd) are set to t.
.hc c The character c (e.g., %) tells roff where hyphens are permitted.
.he t Header titles (even and odd) are set to t.
.hx Header titles are suppressed.
.hy n Hyphenation is done if n is 1, suppressed if it is 0. Default is 1.
.ig Ignore input lines until a line beginning with .. is found.
.in n Indent n spaces from the left margin; force line break.
.ix n Same as .in but continue filling output on current line.
.li n Literal text on next n lines. Copy to output unmodified.
.ll +n Line length (including indent) is set to n (65).
.ls +n Line spacing: n (1) is 1 for single spacing, 2 for double, etc.
.m1 n Insert n (2) blank lines between top of page and header.
.m2 n Insert n (2) blank lines between header and start of text.
.m3 n Insert n (1) blank lines between end of text and footer.
.m4 n Insert n (3) blank lines between footer and end of page.
.na No adjustment of the right margin.
.ne n Need n lines. If fewer are left, go to next page.
.nn +n The next n output lines are not numbered.
.n1 Number output lines in left margin starting at 1.
.n2 n Number output lines starting at n. If 0, stop numbering.
.ni +n Indent line numbers by n (0) spaces.
.nf No more filling of lines.
.nx f Switch input to file f.
.of t Odd page footer title is set to t.
.oh t Odd page header title is set to t.
.pa +n Page adjust by n (1). Same as .bp
.pl +n Paper length is n (66) lines.
.po +n Page offset. Each line is started with n (0) spaces.
.ro Page numbers are printed in Roman numerals.
.sk n Skip n pages (i.e., make them blank), starting with next one.
.sp n Insert n blank lines, except at top of page.
.ss Single spacing. Equivalent to .ls 1.
.ta Set tab stops, e.g., .ta 9 17 25 33 41 49 57 65 73 (default).
.tc c Tabs are expanded into c. Default is space.
.ti n Indent next line n spaces; then go back to previous indent.
.tr ab Translate a into b on output.
.ul n Underline the letters and numbers in the next n lines.