But, I will need some awk help (or to think a little clearer after eating lunch)
Code:
> cat big_file4
a stuff to 1 file
b stuff to 2 file
c stuff to 3 file
a stuff to 1 file
b stuff to 2 file
c stuff to 3 file
a stuff to 1 file
b stuff to 2 file
c stuff to 3 file
d stuff to 4 file
a stuff to 1 file
b stuff to 2 file
c stuff to 3 file
a stuff to 1 file
b stuff to 2 file
c stuff to 3 file
a stuff to 1 file
b stuff to 2 file
c stuff to 3 file
d stuff to 4 file
What I initially wrote does not capture the file line of text - and where I think I need some HELP!
Code:
> cat -n big_file4 | awk '{printf "%1s %-15s \n", substr($1,length($1),1), $2}'
1 a
2 b
3 c
4 a
5 b
6 c
7 a
8 b
9 c
0 d
1 a
2 b
3 c
4 a
5 b
6 c
7 a
8 b
9 c
0 d
Dear all,
I have a large file which is composed of 8000 frames, what i would like to do is split the file into 8000 single files names file.pdb.1, file.pdb.2 etc etc
each frame in the large file is seperated by a "ENDMDL" flag so my thinking is to use this flag a a point to split the files... (4 Replies)
Hello, I am using awk to split a file into multiple files using command:
nawk '{
if ( $1 == "<process" )
{
n=split($2, arr, "\"");
file=arr
}
print > file }' processes.xml
<process name="Process1.process">
... (3 Replies)
Hello, I have a large file (2GB) that I would like to split based on pattern and size.
I've used the following command to split the file (token is "HELLO")
awk '/HELLO/{i++}{print > "file"i}' input.txt
and the output is similar to the following (i included filesize in KB):
10 ... (2 Replies)
Hi ,
I have huge files around 400 mb, which has clob data and have diffeent scenarios:
I am trying to pass scenario number as parameter and and get required modified file based on the scenario number and criteria.
Scenario 1:
file name : scenario_1.txt
... (2 Replies)
Hi,
I have a Huge 7 GB file which has around 1 million records, i want to split this file into 4 files to contain around 250k messages each.
Please help me as Split command cannot work here as it might miss tags..
Format of the file is as below
<!--###### ###### START-->... (6 Replies)
Hi
i have requirement like below
M <form_name> sdasadasdMklkM
D ......
D .....
M form_name> sdasadasdMklkM
D ......
D .....
D ......
D .....
M form_name> sdasadasdMklkM
D ......
M form_name> sdasadasdMklkM
i want split file based on line number by finding... (10 Replies)
Hello All ,
I have a file which needs to split based on the blank lines
Name ABC
Address London
Age 32
(4 blank new line)
Name DEF
Address London
Age 30
(4 blank new line)
Name DEF
Address London (8 Replies)
Hi,
I have a text file (attached the sample). I have also, attached the way the way the files need to be split.
We get this file, that will either have 24 Jurisdictions, or will miss some and retain some.
Like in the attached sample file, there are only Jurisdictions 03,11,14,15, 20 and 30.... (3 Replies)
Hello All,
I have records in a file in a pattern A,B,B,B,B,K,A,B,B,K
Is there any command or simple logic I can pull out records into multiple files based on A record? I want output as
File1: A,B,B,B,B,K
File2: A,B,B,K (9 Replies)
Hi
I have a requirement, where i will receive multiple files in a folder (say: /fol1/fol2/). There will be at least 14 to 16 files. The size of the files will different, some may be 80GB or 90GB, some may be less than 5 GB (and the size of the files are very unpredictable). But the names of the... (10 Replies)
Discussion started by: kpk_ds
10 Replies
LEARN ABOUT DEBIAN
latexml::mathparser
LaTeXML::MathParser(3pm) User Contributed Perl Documentation LaTeXML::MathParser(3pm)NAME
"LaTeXML::MathParser" - parses mathematics content
DESCRIPTION
"LaTeXML::MathParser" parses the mathematical content of a document. It uses Parse::RecDescent and a grammar "MathGrammar".
Math Representation
Needs description.
Possibile Customizations
Needs description.
Convenience functions
The following functions are exported for convenience in writing the grammar productions.
"$node = New($name,$content,%attributes);"
Creates a new "XMTok" node with given $name (a string or undef), and $content (a string or undef) (but at least one of name or content
should be provided), and attributes.
"$node = Arg($node,$n);"
Returns the $n-th argument of an "XMApp" node; 0 is the operator node.
"Annotate($node,%attributes);"
Add attributes to $node.
"$node = Apply($op,@args);"
Create a new "XMApp" node representing the application of the node $op to the nodes @args.
"$node = ApplyDelimited($op,@stuff);"
Create a new "XMApp" node representing the application of the node $op to the arguments found in @stuff. @stuff are delimited
arguments in the sense that the leading and trailing nodes should represent open and close delimiters and the arguments are seperated
by punctuation nodes. The text of these delimiters and punctuation are used to annotate the operator node with "argopen", "argclose"
and "separator" attributes.
"$node = recApply(@ops,$arg);"
Given a sequence of operators and an argument, forms the nested application "op(op(...(arg)))">.
"$node = InvisibleTimes;"
Creates an invisible times operator.
"$boole = isMatchingClose($open,$close);"
Checks whether $open and $close form a `normal' pair of delimiters, or if either is ".".
"$node = Fence(@stuff);"
Given a delimited sequence of nodes, starting and ending with open/close delimiters, and with intermediate nodes separated by
punctuation or such, attempt to guess what type of thing is represented such as a set, absolute value, interval, and so on. If nothing
specific is recognized, creates the application of "FENCED" to the arguments.
This would be a good candidate for customization!
"$node = NewFormulae(@stuff);"
Given a set of formulas, construct a "Formulae" application, if there are more than one, else just return the first.
"$node = NewList(@stuff);"
Given a set of expressions, construct a "list" application, if there are more than one, else just return the first.
"$node = LeftRec($arg1,@more);"
Given an expr followed by repeated (op expr), compose the left recursive tree. For example "a + b + c - d" would give "(- (+ a b c)
d)">
"Problem($text);"
Warn of a potential math parsing problem.
"MaybeFunction($token);"
Note the possible use of $token as a function, which may cause incorrect parsing. This is used to generate warning messages.
AUTHOR
Bruce Miller <bruce.miller@nist.gov>
COPYRIGHT
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.
perl v5.10.1 2009-06-11 LaTeXML::MathParser(3pm)