Sponsored Content
Top Forums UNIX for Dummies Questions & Answers count number of fields not using SED or AWK Post 302336976 by strasner on Thursday 23rd of July 2009 07:44:48 AM
Old 07-23-2009
awesome, that works.

thanks alot

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How count number of fields in a record

Dear All , I have the query cat temp.txt |28-07-1997|IF_LEG_DCCT|TOV JV sdfsdfdsfdsfdsCLOSED* KIEV|381015280 I need to count the number of fields in this pipe-seperated file. I beleive this is possible via AWK command. The in above file, output of the count should be 5.... Can some-one... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

2. Shell Programming and Scripting

awk sed cut? to rearrange random number of fields into 3 fields

I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want. The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies

3. Shell Programming and Scripting

Count the number of fields in column

Hi I was going through the below thread https://www.unix.com/shell-programming-scripting/48535-how-count-number-fields-record.html I too have something similar requirement as specified in this thread but the number of columns in my case can be very high, so I am getting following error. ... (3 Replies)
Discussion started by: shekharjchandra
3 Replies

4. Shell Programming and Scripting

count and number instances of a character in sed or awk

I currently use LaTeX together with a sed script to set cloze test papers for my students. I currently pepend and equals sign to the front of the words I want to leave out in the finished test, =perpendicular, for example. I am able to number the blanks using a variable in LaTeX. I would like to... (8 Replies)
Discussion started by: maouinin
8 Replies

5. Shell Programming and Scripting

awk - count character count of fields

Hello All, I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form 1|121|asda|434|thesi|2012|05|24| 1|343|unit|09|best|2012|11|5| I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
Discussion started by: PikK45
6 Replies

6. Shell Programming and Scripting

awk count fields not working

Hi, i am trying to count the fields in a file. Input: 100,1000,,2000,3000,10/26/2012 12:12:30 200,3000,,1000,01/28/2012 17:12:30 300,5000,,5000,7000,09/06/2012 16:12:30 output: Cout of the fileds for each row 6 5 6 awk -F"," '{print $NF}' file1.txt When i try with above awk... (3 Replies)
Discussion started by: onesuri
3 Replies

7. Shell Programming and Scripting

awk to count and rename based on fields

In the below awk using the tab-delimited input, I am trying count the - symbol in $5 and output the count as well as the renamed condition ins. I am also count the - symbol in $6 and output the count as well as the renamed condition del. I am also count the tomes that in $5 and $6 there are... (6 Replies)
Discussion started by: cmccabe
6 Replies

8. Shell Programming and Scripting

awk to output match and mismatch with count using specific fields

In the below awk I am trying output to one file those lines that match between $2,$3,$4 of file1 and file2 with the count in (). I am also trying to output those lines that are missing between $2,$3,$4 of file1 and file2 with the count of in () each. Both input files are tab-delimited, but the... (7 Replies)
Discussion started by: cmccabe
7 Replies

9. Shell Programming and Scripting

awk to remove lines where field count is greather than 1 in two fields

I am trying to remove all the lines and spaces where the count in $4 or $5 is greater than 1 (more than 1 letter). The file and the output are tab-delimited. Thank you :). file X 5811530 . G C NLGN4X 17 10544696 . GA G MYH3 9 96439004 . C ... (1 Reply)
Discussion started by: cmccabe
1 Replies

10. UNIX for Beginners Questions & Answers

awk or sed script to count number of occurrences and creating an average

Hi Friends , I am having one problem as stated file . Having an input CSV file as shown in the code U_TOP_LOGIC/U_HPB2/U_HBRIDGE2/i_core/i_paddr_reg_2_/Q,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,0... (4 Replies)
Discussion started by: kshitij
4 Replies
Catalyst::Plugin::SubRequest(3pm)			User Contributed Perl Documentation			 Catalyst::Plugin::SubRequest(3pm)

Catalyst::Plugin::SubRequest - Make subrequests to actions in Catalyst SYNOPSIS
use Catalyst 'SubRequest'; my $res_body = $c->subreq('/test/foo/bar', { template => 'magic.tt' }); my $res_body = $c->subreq( { path => '/test/foo/bar', body => $body }, { template => 'magic.tt' }); # Get the full response object my $res = $c->subreq_res('/test/foo/bar', { template => 'mailz.tt' }, { param1 => 23 }); $c->log->warn( $res->content_type ); DESCRIPTION
Make subrequests to actions in Catalyst. Uses the catalyst dispatcher, so it will work like an external url call. Methods are provided both to get the body of the response and the full response (Catalyst::Response) object. METHODS
subreq [path as string or hash ref], [stash as hash ref], [parameters as hash ref] subrequest sub_request Takes a full path to a path you'd like to dispatch to. If the path is passed as a hash ref then it can include body, action, match and path. An optional second argument as hashref can contain data to put into the stash of the subrequest. An optional third argument as hashref can contain data to pass as parameters to the subrequest. Returns the body of the response. subreq_res [path as string or hash ref], [stash as hash ref], [parameters as hash ref] subrequest_response sub_request_response Like "sub_request()", but returns a full Catalyst::Response object. SEE ALSO
Catalyst. AUTHORS
Marcus Ramberg, "mramberg@cpan.org" Tomas Doran (t0m) "bobtfish@bobtfish.net" MAINTAINERS
Eden Cardim (edenc) "eden@insoli.de" THANK YOU
SRI, for writing the awesome Catalyst framework MIYAGAWA, for writing the awesome Plack toolkit COPYRIGHT
Copyright (c) 2005 - 2011 the Catalyst::Plugin::SubRequest "AUTHORS" as listed above. LICENSE
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-20 Catalyst::Plugin::SubRequest(3pm)

Featured Tech Videos

All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy