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 HPUX
rcsfile
rcsfile(4) Kernel Interfaces Manual rcsfile(4)NAME
rcsfile - format of RCS files
DESCRIPTION
An RCS file is an ASCII file. Its contents are described by the grammar below. The text is free format, that is, spaces, tabs and newline
characters have no significance except in strings. Strings are enclosed by symbols. If a string contains the symbol, the symbol must be
doubled.
The meta syntax uses the following conventions:
| (bar) Separates alternatives.
{...} (braces) Enclose optional phrases.
{...}* (braces star) Enclose phrases that may be repeated
zero or more times.
{...}+ (braces plus) Enclose phrases that must appear at
least once and may be repeated.
<...> (angle brackets) Enclose nonterminals.
RCS File Grammar
Identifiers are case sensitive. Keywords are in lowercase only. The sets of keywords and identifiers may overlap.
<rcstext> ::= <admin> {<delta>}* <desc> {<deltatext>}*
<admin> ::= head {<num>};
access {<id>}*;
symbols {<id> : <num>}*;
locks {<id> : <num>}*; {strict ;}
comment {<string>};
<delta> ::= <num>
date <num>;
author <id>;
state {<id>};
branches {<num>}*;
next {<num>};
<desc> ::= desc <string>
<deltatext> ::= <num>
log <string>
text <string>
<num> ::= {<digit>{.}}+
<digit> ::= 0 | 1 | ... | 9
<id> ::= <letter>{<idchar>}*
<letter> ::= A | B | ... | Z | a | b | ... | z
<idchar> ::= Any printing ASCII character except space,
tab, carriage return, newline, and <special>.
<special> ::= ; | : | , | @
<string> ::= @{any ASCII character, with "@" doubled}*@
RCS File Structure
The nodes form a tree. All nodes whose numbers consist of a single pair (for example, 2.3, 2.1, 1.3, etc.) are on the trunk, and are
linked through the field in order of decreasing numbers. The field in the node points to the head of that sequence (that is, contains the
highest pair).
All nodes whose numbers consist of 2n fields (n>=2) (for example, 3.1.1.1, 2.1.2.2, etc.) are linked as follows. All nodes whose first
(2n)-1 number fields are identical are linked through the field in order of increasing numbers. For each such sequence, the node whose
number is identical to the first 2(n-1) number fields of the deltas on that sequence is called the branchpoint. The field of a node con-
tains a list of the numbers of the first nodes of all sequences for which it is a branchpoint. This list is ordered in increasing numbers.
EXAMPLES
head
|
|
v
---------
/ / | | / /
/ / | 2.1 | / /
/ / | | / __/ \__
/1.2.1.3 /1.3.1.1 | | /1.2.2.2 /1.2.2.1.1.1
-------------------------------------------------
^ ^ | ^ ^
| | | | |
| | v | |
/ | --------- / |
/ | 1.3 / / |
/ --------- / / -----------
/1.2.1.1 / /1.2.2.1
--------- / ---------
^ | ^
| | |
| v |
| --------- |
| 1.2 / |
---------------------- /---------
/
/
|
|
v
---------
1.1 /
/
/
/
WARNINGS
RCS is designed to be used with text (ASCII) files only. Using RCS with nontext (binary) files results in data corruption.
AUTHOR
was developed by Walter F. Tichy, Purdue University, West Lafayette, IN 47907, USA.
1982 by Walter F. Tichy.
SEE ALSO ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsmerge(1), rlog(1), rcsintro(5).
rcsfile(4)