I don't think you can have a swiss army knife solution to a wild card problem. Please decently describe the data conents / structure in all cases, for every case, in detail. Are above the only three cases, or are there more? Is that pipe symbol enclosed in spaces or not always? Could it be used as a field separator? WIll the more-than-four-line data always be using braces to enclose the last field? One level of braces only?
You seem to want to print sth. like
in the "good cases". What should be the output in the "FAILED" cases? What in the multiline case?
You could use sth. like this to get the full records to operate upon:
Hi,
I have data with broken lines:
Sample data:
"12"|"25"|"a"|"b"|"c"|"d"|"e"|"f"|"2453748"|"08:10:50"
"16"|"25"|"a"|"b"|"c"|"d"|"e"|"f"|"
2453748"|"08:15:50"
"16"|"25"|"a"|"b"|"
c"|"d"|"e"|"f"|"2453748"|"08:19:50"
"16"|"25"|"a"|"b"|"c"|"d"|"e"|"f"|"2453748"|"08:19:50"
In the... (5 Replies)
Hi everyone!
I'm not new to Unix, but I've never used awk before.
I tried to look up this information on several sites and forums,
I also looked in the documentation but I haven't found a solution yet.
I would like to print the previous 3 lines before and the following 4 lines after the... (6 Replies)
Hi everyboby
this is my problem
I Have this input
1111;222
222
2;333
3333;4444
111;
22222;33
33;
444
and I need this output
1111;2222222;3333333;4444 (15 Replies)
say I'm doing awk 'NR==534'
Is there a way to display 534 535 536 537?
without appending to a variable? per line? maybe an easier way with a different command?
My first impression was NR==534-537 but that would be too easy :P (2 Replies)
Hi.
I need to filter lines based upon matches in multiple tab-separated columns. For all matching occurrences in column 1, check the corresponding column 4. IF all column 4 entries are identical, discard all lines. If even one entry in column 4 is different, then keep all lines.
How can I... (5 Replies)
What is the correct syntax to have the awk parse the next line as well? The next in bold is where I think it should go, but I wanted to ask the experts since I am a beginner. The file to be parsed is attached as well. Thank you :).
awk 'NR==2 {split($2,a,"");b=substr(a,1,length(a-1));print... (6 Replies)
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
LEARN ABOUT LINUX
knife
KNIFE(8) System Manager's Manual KNIFE(8)NAME
knife, axe, cutter, chainsaw - tools to improve network performance via SNIP
SYNOPSIS
knife is used to control the network via Sysadmin Network Interrupt Protocol [SNIP].
DESCRIPTION
Experience has shown that suitable application of these tools on the network can lead to improved network performance, as busy segments of
useless traffic can be isolated from the important stuff (and the rest of the world, for that matter). However, care must be taken, other-
wise lusers will be complaining about "network downtime".
knife vs LART
While knife can be used as a replacement for LART, the reverse is not generally true; while blunt trauma works wonders on lusers, it tends
to be ineffective on cables. Also, note that using knife or one of it's associates as a LART will probably lead to higher level assault
charges than one would get with a standard LART.
chainsaw, the power SNIP tool
chainsaw is a version of knife that makes quick work of almost any problem. It also has a correspondingly higher potential for causing
unintentional damage. Handle with care.
FILES
In its normal application to cables, knife uses no files. If applied to a disk, many files may be affected; see mkfs(8).
SEE ALSO lart(8)BUGS
You may be required to fix things eventually.
RESTRICTIONS
Bosses and the legal system may take a dim view of overenthusiastic application of these tools.
AUTHOR
While the origin of the first knife remains a mystery, this man page was written by Kurt Hockenbury <kurt@something.com>. He disclaims
responsibility for any actions inspired by this man page.
HISTORY
SNIP was first described on alt.sysadmin.recovery by J.D. Falk <jdfalk@cais.cais.com> as a followup to a post by <martin@angela.ctrl-
c.liu.se>.
KNIFE(8)