10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
2. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
3. Shell Programming and Scripting
Hi friends,
I have a some files in a directory. for example
856-abc
856-def
851-abc
945-def
956-abc
852-abc
i want to display only those files whose name starts with 856* 945* and 851* using a single pattern.
i.e
856-abc
856-def
851-abc
945-def
the rest of the two files... (2 Replies)
Discussion started by: Little
2 Replies
4. Shell Programming and Scripting
I have one single shown below and I need to break each ST|850 & SE to separate file using unix script. Below example should create 3 files. We can use ST & SE to filter as these field names will remain same.
Please advice with the unix code.
ST|850
BEG|PO|1234
LIN|1|23
SE|4
ST|850... (3 Replies)
Discussion started by: prasadm
3 Replies
5. Shell Programming and Scripting
Hi ,
I have a file which has multiple rows of data, i want to match the pattern for two columns and if both conditions satisfied i have to add the counter by 1 and finally print the count value. How to proceed...
I tried in this way...
awk -F, 'BEGIN {cnt = 0} {if $6 == "VLY278" &&... (6 Replies)
Discussion started by: aemunathan
6 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
7. UNIX for Advanced & Expert Users
Hi Everybody,
Below are the contents of the a text file ..,
SN = 8
MSI = 405027002277133
IKVALUE = DE6AA6A11D42B69DF6398D44B17BC6F2
K4SNO = 2
CARDTYPE = SIM
ALG = COMP128_3
SN = 8
MSI = 405027002546734
IKVALUE = 1D9F8BAA73973D8FBF8CBFB01436D822
K4SNO = 2
CARDTYPE = SIM
ALG =... (8 Replies)
Discussion started by: prasanth_babu
8 Replies
8. Shell Programming and Scripting
I've got a longish log file with content such as
Uplink traffic:
Downlink traffic:
I want to parse the log file and remove any line that contains the string "Uplink traffic:" at the beginning of the line, but only if the line following it beginnings with the string "Downlink traffic:" (in... (7 Replies)
Discussion started by: Yorkie99
7 Replies
9. UNIX for Dummies Questions & Answers
I have record having 10 fields and each field being printed on a new line, first line cotains name of exchange, 2nd line stock name, third line stock price, etc etc...
now i want to retrieve data only for a particular exchanged and that too only 2nd and 3rd row info...
NSE
RNRL
70
12
1... (1 Reply)
Discussion started by: manishma71
1 Replies
10. Shell Programming and Scripting
I have the following data file.
zz=aa azxc-1234 aa=aa
zz=bb azxc-1234 bb=bb
zz=cc azxc-1234 cc=cc
zz=dd azxc-2345 dd=dd
zz=ee azxc-2345 ee=ee
zz=ff azxc-3456 ff=ff
zz=gg azxc-4567 gg=gg
zz=hh azxc-4567 hh=hh
zz=ii azxc-4567 ii=ii
I want to make 2nd field pattern matching multiple lines... (13 Replies)
Discussion started by: VTAWKVT
13 Replies