Sponsored Content
Full Discussion: iterative parsing
Top Forums Shell Programming and Scripting iterative parsing Post 302496841 by Scrutinizer on Tuesday 15th of February 2011 12:10:56 PM
Old 02-15-2011
Alternatively:
Code:
awk 'NR>1{print $2,$5,$20,$22,$24,$26,$28,$30,$32,$42,$50,$61,$72}' RS= infile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

parsing

Hi, I want to parse this file.... ( 0 , 0 ) =>heading1 ( 0 , 1 ) =>value1.1a ( 0 , 2 ) =>value2.1a ( 1 , 0 ) =>heading2 ( 1 , 1 ) =>value1.1b ( 1 , 2 ) =>value2.1b ( 2 , 0 ) =>heading3 ( 2 , 1 ) =>value1.1c ( 2 , 2 ) =>value2.1c ( 3 , 0 ) =>heading4 ( 3 , 1 ) =>value1.1d ( 3 , 2... (15 Replies)
Discussion started by: tungaw2004
15 Replies

2. Shell Programming and Scripting

Parsing question

Hi Guys, I was wondering if you could help me out - I have a directory /home/users/datafiles/ which contain files "dat dd-mm-yy.xls" I am trying to write a script which does the following - (1) loops through all the files (2) retrieves the dd-mm-yy string and converts it into a... (12 Replies)
Discussion started by: muser
12 Replies

3. Shell Programming and Scripting

Need some help with parsing

I have a big xml file with little formatting in it. It contains over 600 messages that I need to break each message out in its own separate file. The xml file looks in the middle of it something like this: </Title></Msg><Msg><Opener> Hello how are you?<Title> Some says hello</Title><Body>... (3 Replies)
Discussion started by: quixoticking11
3 Replies

4. Shell Programming and Scripting

Perl parsing compared to Ksh parsing

#! /usr/local/bin/perl -w $ip = "$ARGV"; $rw = "$ARGV"; $snmpg = "/usr/local/bin/snmpbulkget -v2c -Cn1 -Cn2 -Os -c $rw"; $snmpw = "/usr/local/bin/snmpwalk -Os -c $rw"; $syst=`$snmpg $ip system sysName sysObjectID`; sysDescr.0 = STRING: Cisco Internetwork Operating System Software... (1 Reply)
Discussion started by: popeye
1 Replies

5. Shell Programming and Scripting

Iterative operation

grep -o '\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}' then how do i iterate the file names?? (19 Replies)
Discussion started by: ravis83
19 Replies

6. Shell Programming and Scripting

Need help with some iterative file processing

Gurus - Please help with this urgent situation. I have the following problem to solve using a shell script: 1. There are about 13 files named CONTAINER_1.lst, CONTAINER_2.lst, CONTAINER_3.lst .....CONTAINER_13.lst 2. Each of these files contain about 8 lines (in most cases) containing... (1 Reply)
Discussion started by: inditopgun
1 Replies

7. Shell Programming and Scripting

Parsing the data

Hi I need to parse the following data using shell script Table ----- stage4n_abc 48 stage4o_abcd 4 adashpg_abc_HeartBeat 1 stage4l_asc 168 Can anyone gimme the solution. I want each value to get stored in an array or variable and want the value to be greped from another file.... (1 Reply)
Discussion started by: Archana.Dheepan
1 Replies

8. Shell Programming and Scripting

Iterative statement to cut values from a line

Hi I am new to shell scripting and trying to get values from a text file, I have a text file with values seperated with "|". like aga|120220090525|120220090525|120220090525|120220090530 bab|120220090530|120220090530|120220090535|120220090535|120220090535... (4 Replies)
Discussion started by: mannepalli
4 Replies

9. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

10. Shell Programming and Scripting

parsing

Can some body show me a sed command to remove everyhing upto a '/' and leave the rest of the line. cat data.out This is the directory /tmp/xxx/yy.ksh I only want to get the fullpath name /tmp/xxx.yy.ksh Thanks in advance to all who answer. (3 Replies)
Discussion started by: BeefStu
3 Replies
pamstretch(1)						      General Commands Manual						     pamstretch(1)

NAME
       pamstretch - scale up a PNM or PAM image by interpolating between pixels

SYNOPSIS
       pamstretch [-xscale=X] [-yscale=Y]
       [-blackedge] [-dropedge] N [infile]

       You  can use the minimum unique abbreviation of the options.  You can use two hyphens instead of one.  You can separate an option name from
       its value with white space instead of an equals sign.

DESCRIPTION
       pamstretch scales up pictures by integer values, either vertically, horizontally, or both.  pamstretch differs from pnmscale and pnmenlarge
       in  that  when it inserts the additional rows and columns, instead of making the new row or column a copy of its neighbor, pamstretch makes
       the new row or column an interpolation between its neighbors.  In some images, this produces better looking output.

       To scale up to non-integer pixel sizes, e.g. 2.5, try pamstretch-gen(1) instead.

       Options let you select alternative methods of dealing with the right/bottom edges of the picture.  Since the interpolation is done  between
       the  top-left  corners of the scaled-up pixels, it's not obvious what to do with the right/bottom edges.  The default behaviour is to scale
       those up without interpolation (more precisely, the right edge is only interpolated vertically, and the bottom edge  is	only  interpolated
       horizontally), but there are two other possibilities, selected by the blackedge and dropedge options.

PARAMETERS
       The  N  parameter  is the scale factor.	It is valid only if you don't specify -xscale or -yscale.  In that case, pamstretch scales in both
       dimensions and by the scale factor N.

OPTIONS
       -xscale=X
	      This is the horizontal scale factor.  If you don't specify this, but do specify a vertical scale factor, the horizontal scale factor
	      is 1.

       -yscale=Y
	      This  is	the vertical scale factor.  If you don't specify this, but do specify a horizontal scale factor, the vertical scale factor
	      is 1.

       -blackedge
	      interpolate to black at right/bottom edges.
       -dropedge
	      drop one (source) pixel at right/bottom edges. This is arguably more logical than the default behaviour, but it means producing out-
	      put which is a slightly odd size.

BUGS
       Usually	produces  fairly  ugly	output	for PBMs. For most PBM input you'll probably want to reduce the `noise' first using something like
       pnmnlfilt(1).

SEE ALSO
       pamstretch-gen(1), pnmenlarge(1), pnmscale(1), pnmnlfilt(1)

AUTHOR
       Russell Marks (russell.marks@ntlworld.com).

								 11 November 2001						     pamstretch(1)
All times are GMT -4. The time now is 02:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy