Sponsored Content
Full Discussion: Order text by delimiters
Top Forums Shell Programming and Scripting Order text by delimiters Post 302367722 by bobbasystem on Tuesday 3rd of November 2009 09:37:34 AM
Old 11-03-2009
Quote:
Originally Posted by Franklin52
Something like this?

Code:
awk '/interface/{s=$0} /description/{s=s FS $0} /ip/{print s FS $0} ' file

thanks, is what I need....but how write de output in a file?

the command awk .......> file_output did not work.
 

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
SHANTY(1)							      Shanty								 SHANTY(1)

NAME
Shanty - Makes a PostScript file from an image and some text. SYNOPSIS
shanty -i image_file [-t text_file] [-o output_file] [-s paper_size] [-d density] [-m margin] [-b background_color] [-x padding] [-n title] [-l orientation] [-rtl] [-btt] [-f font_name] [-altgd] DESCRIPTION
Shanty takes a text file and an image (PNG or JPG) and creates a PostScript file where one pixel in the image becomes one character in the PostScript. OPTIONS
-i, -image Name of the image to load in. JPG and PNG images are supported. This is the only compulsory field. -t, -text Name of the text file to load in, if omitted STDIN is used. -o, -output Name of the PostScript file to produce, if omitted STDOUT is used. -s, -size Size of the paper to work with. This field should be one of: "a0", "a2", "a3", "a4", "a5", "a6", "letter", "broadsheet", "ledger", "tabloid", "legal", "executive" and "36x36". Default is "a4". -d, -density Density of the text. Higher numbers are more dense, default is 1.4. -m, -margin The margins of the page in cm. Default is 1. -b, -background The colour of a backing rectangle to place behind the text. Colours are specified as "R,G,B" with each value between 0 and 255. "off" means no backing colour. Default is "off". -x, -p, -padding Density of the text. Higher numbers are more dense, default is 1.4. -n, -title The title of the output to write as meta-data in the PostScript file. Default is "Shanty output". -l, -orientation The orientation of the paper, can be "portrait", "landscape" or "auto". Default is "auto". -rtl Switch to right-to-left text. -btt Switch to bottom-to-top text. -f, -font Specify font. The font name specified must be visible to the not just make a font magically appear. Default is "Courier-Bold". -altgd If you have problems loading the GD library, try this switch. HOMEPAGE
<http://www.codebunny.org/coding/shanty/> AUTHOR
Duncan Martin <duncan@codebunny.org> ACKNOWLEDGEMENTS
Many thanks to DFB <http://www.cs.nott.ac.uk/~dfb/> and contributors to comp.lang.postscript. Duncan Martin 6 October 2006 SHANTY(1)
All times are GMT -4. The time now is 03:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy