Sponsored Content
Full Discussion: Parse a file using awk
Top Forums Shell Programming and Scripting Parse a file using awk Post 302777711 by rajangupta2387 on Friday 8th of March 2013 10:25:37 AM
Old 03-08-2013
Hi,

Thanks it is working but still i am now facing issues w.r.t to "printf" statement.

Input:

Code:
Comptel_6_UAT|IXBS_ENCODER|Packages|UPC_CFG_NL_DMS100_IXBS_ENCODER|NOT EXIST|2.1.1.
Comptel_6_UAT|IXBS_ENCODER|Packages|EL_LIB_FNL|NOT EXIST|1.5.1.
Comptel_6_UAT|IXBS_ENCODER|Packages|EL_LIB_CML|NOT EXIST|1.5.4.
Comptel_6_UAT|IXBS_ENCODER|Packages|EL_APP_MULTI_FORMAT_ENCODER|NOT EXIST|1.5.9.
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|UniqueOutputFileNames|NOT EXIST|1
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|SeparationCondition|NOT EXIST|EL_IXBS_SEPARATION
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|SeparateSourceID|NOT EXIST|0
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|SeparateSequenceNumbersInOutput|NOT EXIST|1
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|SeparateSequenceNumbersInFileNames|NOT EXIST|0
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|ResetInterval|NOT EXIST|0
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|RemoveFileTemplates|NOT EXIST|1
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|RemoveFileTemplatesTimeout|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|RecordWaitingTimeLimit|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|RecordLimit|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|RealTimeDelivery|NOT EXIST|0
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|OutputFileNameCreationMask|NOT EXIST|IXBS&CREATIONTIME(%Y%m%d%H%M%S)&FIRST(EL_OUT_FILE_SEQ)&FSIZE(9)&COUNT(*,6).CDR.&SOURCEID
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|OutputDescriptionFileName|NOT EXIST|UPC_NL_DMS100_IXBS_Description.xml
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|MinAgeOfFile|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|MaxAgeOfFile|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|InputFileNameExtractionMask|NOT EXIST|([a-zA-Z0-9]{7}_)(AMAUTH_0000)([0-9]{2})(_)([0-9]{14})
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|FileSizeLimit|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|CreateEmptyOutputFiles|NOT EXIST|0
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|CreateEmptyOutputFileOnSeparation|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|CreateEmptyOutputFileOnFlush|NOT EXIST|
Comptel_6_UAT|IXBS_ENCODER|NodeParameters|CloseFilesAtSchedule|NOT EXIST|1
Comptel_6_UAT|IXBS_ENCODER|Links|IXBS_ENCODER_OUT|NOT EXIST|1


I checked that printf is considering it to be operators. Do we have a solution for this as well?
Moderator's Comments:
Mod Comment
Please use code tags when posting data and code samples!

Last edited by vgersh99; 03-08-2013 at 11:29 AM.. Reason: code tags, please
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse file using awk and work in awk output

hi guys, i want to parse a file using public function, the file contain raw data in the below format i want to get the output like this to load it to Oracle DB MARWA1,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00 MARWA2,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00 this the file raw format: Number of... (6 Replies)
Discussion started by: dagigg
6 Replies

2. Shell Programming and Scripting

AWK - Parse a big file

INPUT SAMPLE Symmetrix ID : 000192601507 Masking View Name : TS00P22_13E_1 Last updated at : 05:10:18 AM on Tue Mar 22,2011 Initiator Group Name : 10000000c960b9cd Host Initiators { WWN : 10000000c960b9cd } Port Group Name :... (8 Replies)
Discussion started by: greycells
8 Replies

3. Shell Programming and Scripting

Parse a file with awk?

Hi guys (and gals). I need some help. I'm running an IVR purely on Asterisk where I capture the DTMFs. After pulsing each DTMF I have Asterisk write to a file with whatever was dialed (mostly used for record-keeping) and at the end of the survey I write all variables in a single line to a... (2 Replies)
Discussion started by: tulf210
2 Replies

4. Shell Programming and Scripting

AWK Command parse a file based on string.

AWK Command parse a file based on string. I am trying to write a shell script to parse a file based on a string and move the content of the file to another file. Here is scenario. File content below Mime-Version: 1.0 Content-Type: multipart/mixed; ... (2 Replies)
Discussion started by: aakishore
2 Replies

5. Shell Programming and Scripting

AWK script to parse a data in a file

Hi Unix gurus.. I have a file which has below data, It has several MQ Queue statistics; QueueName= 'TEST1' CreateDate= '2009-10-30' CreateTime= '13.45.40' QueueType= Predefined QueueDefinitionType= Local QMinDepth= 0 QMaxDepth= 0 QueueName= 'TEST2' CreateDate= '2009-10-30'... (6 Replies)
Discussion started by: dd_psg
6 Replies

6. Shell Programming and Scripting

Using awk to Parse File

Hi all, I have a file that contains a good hundred of these job definitions below: Job Name Last Start Last End ST Run Pri/Xit ________________________________________________________________ ____________________... (7 Replies)
Discussion started by: atticuss
7 Replies

7. Shell Programming and Scripting

awk to parse html file

Is it possible in awk to parse a webpage (EDAR Gene Sequencing - Genetic Testing Company | The DNA Diagnostic Experts | GeneDx), the source code is attached. <title> EDAR Gene Sequencing <dt>Test Code:</dt> <dd>156 </dd> <dt>Turnaround Time:</dt> <dd>6-8 weeks </dd> ... (4 Replies)
Discussion started by: cmccabe
4 Replies

8. Shell Programming and Scripting

awk or perl to parse file

I have an input file attached that I am trying to parse in tab-delimanted format: The chromosomal variant column contains all the information: parse rules: 1. 4 zeros after the NC_ and the digits before the . 2. digits after the g. repeated twice separated by a tab 3. letter before the > 4.... (10 Replies)
Discussion started by: cmccabe
10 Replies

9. Shell Programming and Scripting

awk parse result that match data from file

i run command that return this result,example : gigabitethernet2/2/4:NotPresent, gigabitethernet2/1/17:UP, gigabitethernet2/1/10:UP, gigabitethernet2/1/5:UP, gigabitethernet2/1/9:UP, gigabitethernet2/1/36:DOWN, gigabitethernet2/1/33:DOWN, gigabitethernet2/1/8:UP,... (19 Replies)
Discussion started by: wanttolearn1
19 Replies

10. Shell Programming and Scripting

How to parse this file using awk and output in CSV format?

My source file looks like this: Cust-Number = "101" Cust-Name="Joe" Cust-Town="London" Cust-hobby="tennis" Cust-purchase="200" Cust-Number = "102" Cust-Name="Mary" Cust-Town="Newyork" Cust-hobby="reading" Cust-purchase="125" Now I want to parse this file (leaving out hobby) and... (10 Replies)
Discussion started by: Balav
10 Replies
ppmtosixel(1)                                                 General Commands Manual                                                ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 10:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy