Sponsored Content
Full Discussion: Data formatting using awk
Top Forums Shell Programming and Scripting Data formatting using awk Post 302843521 by ajayram_arya on Tuesday 13th of August 2013 03:25:24 PM
Old 08-13-2013
Thanks a lot rdrtx1, RudiC for giving some inputs they really help me .!!!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk formatting of a data file - nested for loops?

Hello - is there any way in awk I can do... 4861 x(1) y(1) z(1) 4959 x(1) y(1) z(1) 5007 x(1) y(1) z(1) 4861 x(2) y(2) z(2) 4959 x(2) y(2) z(2) 5007 x(2) y(2) z(2) 4861 x(3) y(3) z(3) 4959 x(3) y(3) z(3) 5007 x(3) y(3) z(3) to become... 4861 x(1) y(1) z(1) 4861 x(2) y(2) z(2)... (3 Replies)
Discussion started by: catwoman
3 Replies

2. UNIX for Dummies Questions & Answers

Formatting Data

i am writing a script that reads in a file and i just want it to print each element on a new line here is my code and the data that i want to read in #!/usr/bin/perl use strict; use CGI qw(:standard); use CGI qw(:cgi); my $data_file = "/tmp/results.txt"; my $configuration; my... (3 Replies)
Discussion started by: nmeliasp
3 Replies

3. Shell Programming and Scripting

Script for data formatting

Hi I have to convert the data in a file ******* 01-20-09 11:14AM 60928 ABC Valuation-2009.xls 01-20-09 11:16AM 55808 DEF GHI Equation-2009.xls 01-20-09 11:02AM 52736 ABC DF Valuation-2009.xls 01-20-09 11:06AM 89600 THE... (6 Replies)
Discussion started by: shekhar_v4
6 Replies

4. Shell Programming and Scripting

formatting data file with awk or sed

Hi, I have a (quite large) data file which looks like: _____________ header part.. more header part.. x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 ... ... x59 x60 y1 y2 y3 y4... ... y100 ______________ where x1, x2,...,x60 and y1, y2,...y100 are numbers of 10 digits (so each line... (5 Replies)
Discussion started by: lego
5 Replies

5. Shell Programming and Scripting

Formatting input data

Hello everybody, I have a file containing some statistics regarding CPU usage. The file has this syntax : Fri Jul 16 14:27:16 EEST 2010 Cpu(s): 15.2%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st Fri Jul 16 15:02:17 EEST 2010 Cpu(s): 15.3%us, 1.4%sy, 0.0%ni, 82.3%id, ... (9 Replies)
Discussion started by: spiriad
9 Replies

6. Shell Programming and Scripting

help with data formatting

Hi, I have data coming in like below. Not all data is like that, these are the problem records that is causing the ETL load to fail. Can you pls help me with combining theese broken records! 001800018000000guyMMAAY~acct name~acct type~~"address part 1 address... (8 Replies)
Discussion started by: varman
8 Replies

7. UNIX for Advanced & Expert Users

formatting the data

HI I want to make it single row if start with braces i.e. { .Any idea {1:XXX2460275191}{2:SEC00687921131112201641N}{3:{58910}}{4: :R:GENL :C::xx//xx1 :20C::yy//yy1 :2S:xxT} {1:XXX2460275190}{2:SEC00687921131112201641y}{3:{58911}}{4: :z:GENL :v::xx//xx1 :10C::yy//yy1 :4S:xxT ... (2 Replies)
Discussion started by: mohan705
2 Replies

8. Shell Programming and Scripting

AWK/Shell script for formatting data in a file

Hi All, Need an urgent help to convert a unix file in to a particular format: **source file:** 1111111 2d2f2h2 3dfgsd3 ........... 1111111 <-- repeats in every nth line. remaining all lines will be different 123ss41 432ff45 ........... 1111111 <-- repetition qwe1234 123weq3... (1 Reply)
Discussion started by: rajivnairfis
1 Replies

9. Shell Programming and Scripting

Help with data formatting

Hi, I am generating the following output from my script. Country,A,B,C,D,E,F INDIA ,3755019,774604,484749,329838,7333612,442031 CHINA ,3716520,889197,530899,379754,6198475,355768 JAPAN ,52038,30462,231224,147275,1272,498 USA,9494,1130,0,0,15303,451... (5 Replies)
Discussion started by: karumudi7
5 Replies
HTML::Form(3)						User Contributed Perl Documentation					     HTML::Form(3)

NAME
HTML::Form - Class that represents HTML forms SYNOPSIS
use HTML::Form; $form = HTML::Form->parse($html, $base_uri); $form->value(query => "Perl"); use LWP; LWP::UserAgent->new->request($form->click); DESCRIPTION
Objects of the "HTML::Form" class represents a single HTML <form> ... </form> instance. A form consist of a sequence of inputs that usu- ally have names, and which can take on various values. The following methods are available: $form = HTML::Form->new($method, $action_uri, [[$enctype], $input,...]) The constructor takes a $method and a $uri as argument. The $enctype and and initial inputs are optional. You will normally use HTML::Form->parse() to create new HTML::Form objects. @forms = HTML::Form->parse($html_document, $base_uri) The parse() class method will parse an HTML document and build up "HTML::Form" objects for each <form> found. If called in scalar con- text only returns the first <form>. Returns an empty list if there are no forms to be found. The $base_uri is (usually) the URI used to access the $html_document. It is needed to resolve relative action URIs. For LWP this parameter is obtained from the $response->base() method. $form->push_input($type, \%attr) Adds a new input to the form. $form->method( [$new] ) $form->action( [$new] ) $form->enctype( [$new] ) These method can be used to get/set the corresponding attribute of the form. $form->inputs This method returns the list of inputs in the form. $form->find_input($name, $type, $no) This method is used to locate some specific input within the form. At least one of the arguments must be defined. If no matching input is found, "undef" is returned. If $name is specified, then the input must have the indicated name. If $type is specified then the input must have the specified type. In addition to the types possible for <input> HTML tags, we also have "textarea" and "option". The $no is the sequence number of the input with the indicated $name and/or $type (where 1 is the first). $form->value($name, [$value]) The value() method can be used to get/set the value of some input. If no input have the indicated name, then this method will croak. $form->try_others(&callback) This method will iterate over all permutations of unvisited enumerated values (<select>, <radio>, <checkbox>) and invoke the callback for each. The callback is passed the $form as argument. $form->make_request Will return a HTTP::Request object that reflects the current setting of the form. You might want to use the click method instead. $form->click([$name], [$x, $y]) Will click on the first clickable input ("input/submit" or "input/image"), with the indicated $name, if specified. You can optinally specify a coordinate clicked, which only makes a difference if you clicked on an image. The default coordinate is (1,1). $form->form Returns the current setting as a sequence of key/value pairs. $form->dump Returns a textual representation of the form. Mainly useful for debugging. If called in void context, then the dump is printed on STDERR. INPUTS
An "HTML::Form" contains a sequence of inputs. References to the inputs can be obtained with the $form->inputs or $form->find_input meth- ods. Once you have such a reference, then one of the following methods can be used on it: $input->type Returns the type of this input. Types are stuff like "text", "password", "hidden", "textarea", "image", "submit", "radio", "checkbox", "option"... $input->name([$new]) $input->value([$new]) These methods can be used to set/get the current name or value of an input. If the input only can take an enumerated list of values, then it is an error to try to set it to something else and the method will croak if you try. $input->possible_values Returns a list of all values that and input can take. For inputs that does not have discrete values this returns an empty list. $input->other_possible_values Returns a list of all values not tried yet. $input->form_name_value Returns a (possible empty) list of key/value pairs that should be incorporated in the form value from this input. $input->click($form, $x, $y) Some input types (currently "sumbit" buttons and "images") can be clicked to submit the form. The click() method returns the corrsponding "HTTP::Request" object. SEE ALSO
LWP, HTML::Parser, webchatpp COPYRIGHT
Copyright 1998-2000 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. libwww-perl-5.65 2001-08-01 HTML::Form(3)
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy