Sponsored Content
Full Discussion: Order text by delimiters
Top Forums Shell Programming and Scripting Order text by delimiters Post 302366023 by Franklin52 on Wednesday 28th of October 2009 03:11:33 PM
Old 10-28-2009
Something like this should do the trick:

Code:
awk '{$1=$1}1' FS="\n" RS= OFS="," file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Order text display not correct.

My shell script below for import data to Oracle it run okay. but the text display not correct follow order command executed. =========================Shell Script code================= #!/bin/sh #directory = ${1-'pwd'} #run import data with SQLLoader runSQLLoader() { ... (2 Replies)
Discussion started by: raccsdl
2 Replies

2. UNIX for Advanced & Expert Users

extract text b/w two delimiters

I have an input file which looks like " @$SCRIPT/atp_asrmt_adj.sql $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1005w.pls $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1006w.pls start $SCRIPT/cim1020d.sql;^M spool $DATA/cim1021m.sql @$DATA/cim1021m.sql ! rm $DATA/cim1021m.sql spool $DATA/cim1021m.sql... (6 Replies)
Discussion started by: dowsed4u8
6 Replies

3. Shell Programming and Scripting

Ascending order within text

I appreciate all the help that I've already received but am running into one problem. I can find how to add something before a file with ascending numbers but not like this. I basically have a file that looks like this: 100 101 102 103 104 I need to add the following before each line with... (5 Replies)
Discussion started by: kerpm
5 Replies

4. Programming

c program to extract text between two delimiters from some text file

needa c program to extract text between two delimiters from some text file. and then storing them in to diffrent variables ? text file like 0: abc.txt ========= aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass... (7 Replies)
Discussion started by: kukretiabhi13
7 Replies

5. AIX

Print text between two delimiters

Hi, Can somebody help me with the below situation, Input File, ======== 2007_08_07_IA-0100-014_(MONTHLY).PDF 2007_08_07_IA-0100-031_(QUARTERLY)(RERUN).PDF 2008-02-28_KR-1022-003_(MONTH)(RERUN)(REC1).CSV Required output, ============ MONTHLY QUARTERLY MONTH ... (15 Replies)
Discussion started by: sravicha
15 Replies

6. Shell Programming and Scripting

Fetch the rows with match string on a fixed lenth text file - NO delimiters

Hi I am trying to fetch the rows with match string "0000001234" Input file looks like below: 09 0 XXX 0000001234 Z 1 09 0 XXX 0000001234 Z 1 09 0 XXX 0000001234 Z 1 09 0 XXX 0000001234 Z 1 09 0 XXX 0000001234 Z 1... (6 Replies)
Discussion started by: nareshk
6 Replies

7. Shell Programming and Scripting

Print text between delimiters IF it contains a certain term...

So I'm racking my brain on appropriate ways to solve a problem that once fixed, will solve every problem in my life. Its very easy (for you guys and gals) I'm sure, but I can't seem to wrap my mind around the right approach. I really want to use bash to do this, but I can't grasp how I'm going to... (14 Replies)
Discussion started by: eh3civic
14 Replies

8. UNIX for Dummies Questions & Answers

Text order

Hello unix.com I have a large text file in this format: merali guzman 34 vernon st 304 hartford CT Connecticut 6106 012-233-232 Working 13/14 100$ Morgan Dvorak 5670 Echo Road Excelsior MN Minnesota 5331 000-000-123 Sleeping 15/17 220$ How can... (1 Reply)
Discussion started by: galford
1 Replies

9. Shell Programming and Scripting

How to put delimiters in text files after fix characters?

Hi , i have a text file in which i want to put delimiters after certain characters ( fix),. like put a delimiter (any like ,) after 1-3 character than 4 than 5 than 6-17 ..... files looks like this (original)... (8 Replies)
Discussion started by: anamdev
8 Replies

10. Programming

find & Replace text using two non-unique delimiters.

I can find and replace text when the delimiters are unique. What I cannot do is replace text using two NON-unique delimiters: Ex., "This html code <text blah >contains <garbage blah blah >. All tags must go,<text > but some must be replaced with <garbage blah blah > without erasing other... (5 Replies)
Discussion started by: bedtime
5 Replies
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)
All times are GMT -4. The time now is 07:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy