Sponsored Content
Top Forums Shell Programming and Scripting Converting line output to column based output Post 302406651 by jlliagre on Tuesday 23rd of March 2010 01:14:03 PM
Old 03-23-2010
Works fine with me. I got 53 lines with 10 columns minus some empty fields. Perhaps are those empty fields an issue ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting gettimeoftheday output to string

Hi .. is there a way i can retrieve the output of gettimeoftheday in a string (1 Reply)
Discussion started by: p_aishwarya
1 Replies

2. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies

3. Shell Programming and Scripting

Converting to columnar output

Hi All, I need some help in script or awk to create a textfile. I have a directory where two subdirectories exists say A and B. Now I need to write a ".txt" file with well arranged(space wraped) three columns in it with the data as follows: 1st column:Serial number(which will increment... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

4. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

5. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

6. Shell Programming and Scripting

Find in first column and replace the line with Awk, and output new file

Find in first column and replace the line with Awk, and output new file File1.txt"2011-11-02","Georgia","Atlanta","x","","" "2011-11-03","California","Los Angeles","x","","" "2011-11-04","Georgia","Atlanta","x","x","x" "2011-11-05","Georgia","Atlanta","x","x","" ... (4 Replies)
Discussion started by: charles33
4 Replies

7. Shell Programming and Scripting

Need help converting df output to gigabytes

I need some help converting the disk space values in kilobytes to gigabytes. I can't use df -h because the report has to be in megabytes for some disk space tracking software the customer is using. I have been playing around with trying to assign variables I can use outside of awk so I can do... (1 Reply)
Discussion started by: kuliksco
1 Replies

8. Shell Programming and Scripting

Read in 2-column CSV, output many files based on field

Is there a way to read in a two-columned CSV file, and based on the fields in 1st column, output many different files? The input/output looks something like: input.csv: call Call Mom. call Call T-Mobile. go Go home. go Go to school. go Go to gas station. play Play music. play Play... (4 Replies)
Discussion started by: pxalpine
4 Replies

9. Ubuntu

Converting Impress output to DVD video

I have a need to convert 'Impress' presentations to DVD video format whilst retaining the original presentation in situ. Copying the individual slides and modifying size etc. in Gimp and then importing them into 'Openshot' is both long winded and the loss of quality is significant. Can anybody... (14 Replies)
Discussion started by: Royalist
14 Replies

10. UNIX for Beginners Questions & Answers

Search a multi-line shell command output and execute logic based on result

The following is a multi-line shell command example: $cargo build Compiling prawn v0.1.0 (/Users/ag/rust/prawn) error: failed to resolve: could not find `setup_panix` in `human_panic` --> src/main.rs:14:22 | 14 | human_panic::setup_panix!(); | ... (2 Replies)
Discussion started by: yogi
2 Replies
HTML::FormHandler::Field::Repeatable(3pm)		User Contributed Perl Documentation		 HTML::FormHandler::Field::Repeatable(3pm)

NAME
HTML::FormHandler::Field::Repeatable - repeatable (array) field VERSION
version 0.40013 SYNOPSIS
In a form, for an array of hashrefs, equivalent to a 'has_many' database relationship. has_field 'addresses' => ( type => 'Repeatable' ); has_field 'addresses.address_id' => ( type => 'PrimaryKey' ); has_field 'addresses.street'; has_field 'addresses.city'; has_field 'addresses.state'; In a form, for an array of single fields (not directly equivalent to a database relationship) use the 'contains' pseudo field name: has_field 'tags' => ( type => 'Repeatable' ); has_field 'tags.contains' => ( type => 'Text', apply => [ { check => ['perl', 'programming', 'linux', 'internet'], message => 'Not a valid tag' } ] ); or use 'contains' with single fields which are compound fields: has_field 'addresses' => ( type => 'Repeatable' ); has_field 'addresses.contains' => ( type => '+MyAddress' ); If the MyAddress field contains fields 'address_id', 'street', 'city', and 'state', then this syntax is functionally equivalent to the first method where the fields are declared with dots ('addresses.city'); You can pass attributes to the 'contains' field by supplying a 'contains' hashref. has_field 'addresses' => ( type => 'Repeatable, init_contains => { wrapper_attr => { class => ['hfh', 'repinst'] } }, ); DESCRIPTION
This class represents an array. It can either be an array of hashrefs (compound fields) or an array of single fields. The 'contains' keyword is used for elements that do not have names because they are not hash elements. This field node will build arrays of fields from the the parameters or an initial object, or empty fields for an empty form. The name of the element fields will be an array index, starting with 0. Therefore the first array element can be accessed with: $form->field('tags')->field('0') $form->field('addresses')->field('0)->field('city') or using the shortcut form: $form->field('tags.0') $form->field('addresses.0.city') The array of elements will be in "$form->field('addresses')->fields". The subfields of the elements will be in a fields array in each element. foreach my $element ( $form->field('addresses')->fields ) { foreach my $field ( $element->fields ) { # do something } } Every field that has a 'fields' array will also have an 'error_fields' array containing references to the fields that contain errors. Complications When new elements are created by a Repeatable field in a database form an attempt is made to re-load the Repeatable field from the database, because otherwise the repeatable elements will not have primary keys. Although this works, if you have included other fields in your repeatable elements that do *not* come from the database, the defaults/values must be able to be loaded in a way that works when the form is initialized from the database item. This is only an issue if you re-present the form after the database update succeeds. ATTRIBUTES
index This attribute contains the next index number available to create an additional array element. num_when_empty This attribute (default 1) indicates how many empty fields to present in an empty form which hasn't been filled from parameters or database rows. num_extra When the field results are built from an existing object (item or init_object) an additional number of repeatable elements will be created equal to this number. Default is 0. add_extra When a form is submitted and the field results are built from the input parameters, it's not clear when or if an additional repeatable element might be wanted. The method 'add_extra' will add an empty repeatable element. $form->process( params => {....} ); $form->field('my_repeatable')->add_extra(1); This might be useful if the form is being re-presented to the user. AUTHOR
FormHandler Contributors - see HTML::FormHandler COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Gerda Shank. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-25 HTML::FormHandler::Field::Repeatable(3pm)
All times are GMT -4. The time now is 09:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy