This command gives me something like below.
What I want is two things:
1) if description= and instances=0, then skip them as to they are not needed.
so, only these will be skipped:
2) if description=xxxx and instances=x, then I want them to be displayed as
so that the repetitive words, description= and instances=, are removed and put the numeric in [ ], and display on one line.
Please advise.
Last edited by Scott; 12-23-2010 at 06:47 AM..
Reason: Please use code tags for terminal output and files also.
If there is empty values like below:
then, the next ones with values like the below are skipped.
So, awk runs fine until it hits the ones like this:
Please advise.
How do I display the filename that has been awk to each of the line in Unix, i need to so far I have tried {print FILENAME;nextfile} but to no avail.
`awk -F, '/1.2 Install TCP Wrappers/ {P=0} /1.1 Apply latest OS patches/ {P=1} P' solarisappsummary.txt solarisdbsummary.txt`
For... (6 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Please can you let me know how to print all the matching lines from a file in one single line using awk. Thanks
I have the following data in the input file
data1
voice2
voice1
speech1
data2
data3
...
...
voice4
speech2
data4
and the output should be as follows
data1 data2... (4 Replies)
Hello people!
I would like to create one script following this stage
I have one directory with 100 files
File001
File002
...
File100
(This is the format of content of the 100 files)
2012/03/10 12:56:50:221875936 1292800448912 12345 0x00 0x04 0
then I have one... (0 Replies)
Hi. Is there a way in awk to show all lines between a line number and the next line containing a particular regex? We can do these, of course:
awk '/regex1/,/regex2/' filename
awk 'FNR > X && FNR < Y' filename
But can they be combined? Thanks. (3 Replies)
HI,
HP-UX B.11.00 A 9000/785 (ta)
I am trying to export a display using Xming & and Telnet (not SSH) but when I try..
$ DISPLAY=192.168.1.75:0.0
$ export DISPLAY
$ xclock
and get..
Xlib: connection to "192.168.1.75:0.0" refused by server
Xlib: No protocol specified
Error:... (4 Replies)
Hello,
I cannot figure this one out. I would like to do the following. I have a line that has 7 words. It is possible that the line can have 20 words too. I always want to show the 9th word and beyond. The 9th word will always change so I do not have something to search for, so I think... (1 Reply)