Sponsored Content
Top Forums Shell Programming and Scripting Is there a awk solution for this?? Post 302175217 by radoulov on Thursday 13th of March 2008 10:43:21 AM
Old 03-13-2008
Code:
awk 'NR == 1 { print "lead1   07q4    07q1    06q4    06q3    sept    oct     nov     tot" }
$1 ~ "^("users")$" && NF > 1 { 
x[$1]++
if (x[$1] == 1) {
  p[$1] = sprintf ("%s\t%s\t%s\t%s\t%s", $1, $2, $5, $6, $7)
  t[$1] = $2 + $5
}
if (x[$1] == 3) {
  printf "%s\t%s\t%s\t%s\t%d\n", p[$1], $2, $3, $4, t[$1] 
 }
}' users="tim|tad" file

 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk solution

Hello! Well, I searched and wasn't able to find a specific example of my dilemma, so hopefully someone could assist? Or maybe there was an example but I missed it? I have two files: file1 = order data file file2 = list of 65,000+ order numbers I would like to extract from 'file1' any... (5 Replies)
Discussion started by: rm -r *
5 Replies

2. Shell Programming and Scripting

AWK or SED solution

Hello. I have big file data like this(part of file): .... 18210102021010000110 47401000000 021001 5166891.16 021011 5166891.16 18210602010020000110 47401000000 020701 8995421.00 021001 8995421.00 021011 8995421.00 030801 .08 18210604011020000110 47401000000 020701 9048.00 021001... (3 Replies)
Discussion started by: maxoff
3 Replies

3. Shell Programming and Scripting

Any solution with awk for volatile columns??

Hi I have this file with content ale,4 ,ale,2 ,ale,1 ,ale,2 ale,1 ,ale,7 ,ale,7 ,ale,13 ale,6 ,ale,1 ,ale,1 ,ale,1 ale,1 ,ale,1 ,ale,37 ,ale,1 ale,1 ,ale,1 ,ale,2 ,ale,37 ale,77 ,ale,1 ,ale,53 ,ale,3 ale,5 ,ale,1 ,ale,2 ,ale,40 ale,1 ,ale,1 ,ale,44 ,ale,1... (7 Replies)
Discussion started by: nikhil jain
7 Replies

4. Shell Programming and Scripting

sed or awk Solution

Hi I am having a csv file like this ahsh,90.82,add,32424,ahha hhdh,98.89,hdhdh,92728,neha hshs,you,97.7,hdhdhd,are,a jsjsj,wonderful,9788,79.9,aheh ahdh,95.5,girl, 2737,jolllI need to add width="100" to the value which is greater than 90 like decimal points but less than 100 Output... (5 Replies)
Discussion started by: kshitij
5 Replies

5. UNIX for Dummies Questions & Answers

Help with awk solution to add columns

Hi all. Wondering if someone can help with an awk solution to a problem I'm stumped with. I have a matrix file with >1000 fields and would like to add another column after each column with a text label. For example: Input: $cat file.txt name col1 col2 col3 coln aaaa ... (2 Replies)
Discussion started by: torchij
2 Replies

6. UNIX for Beginners Questions & Answers

awk solution for Splitting a file.

Hi I have a csv file with as below sdg-catalog-00000001 sdg-sku-00000317 sdg-sku-00000318 sdg-sku-00000319 sdg-sku-00000320 sdg-catalog-00000002 sdg-sku-00000321 sdg-sku-00000322 sdg-sku-00000323 sdg-sku-00000324 sdg-sku-00000325 sdg-catalog-00000003 sdg-sku-00000326... (3 Replies)
Discussion started by: Raghuram717
3 Replies
DateTime::Locale::fr_LU(3)				User Contributed Perl Documentation				DateTime::Locale::fr_LU(3)

NAME
DateTime::Locale::fr_LU SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'fr_LU' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for French Luxembourg. DATA
This locale inherits from the DateTime::Locale::fr locale. It contains the following data. Days Wide (format) lundi mardi mercredi jeudi vendredi samedi dimanche Abbreviated (format) lun. mar. mer. jeu. ven. sam. dim. Narrow (format) L M M J V S D Wide (stand-alone) lundi mardi mercredi jeudi vendredi samedi dimanche Abbreviated (stand-alone) lun. mar. mer. jeu. ven. sam. dim. Narrow (stand-alone) L M M J V S D Months Wide (format) janvier fevrier mars avril mai juin juillet aout septembre octobre novembre decembre Abbreviated (format) janv. fevr. mars avr. mai juin juil. aout sept. oct. nov. dec. Narrow (format) J F M A M J J A S O N D Wide (stand-alone) janvier fevrier mars avril mai juin juillet aout septembre octobre novembre decembre Abbreviated (stand-alone) janv. fevr. mars avr. mai juin juil. aout sept. oct. nov. dec. Narrow (stand-alone) J F M A M J J A S O N D Quarters Wide (format) 1er trimestre 2e trimestre 3e trimestre 4e trimestre Abbreviated (format) T1 T2 T3 T4 Narrow (format) T1 T2 T3 T4 Wide (stand-alone) 1er trimestre 2e trimestre 3e trimestre 4e trimestre Abbreviated (stand-alone) T1 T2 T3 T4 Narrow (stand-alone) 1 2 3 4 Eras Wide avant Jesus-Christ apres Jesus-Christ Abbreviated av. J.-C. ap. J.-C. Narrow av. J.-C. ap. J.-C. Date Formats Full 2008-02-05T18:30:30 = mardi 5 fevrier 2008 1995-12-22T09:05:02 = vendredi 22 decembre 1995 -0010-09-15T04:44:23 = samedi 15 septembre -10 Long 2008-02-05T18:30:30 = 5 fevrier 2008 1995-12-22T09:05:02 = 22 decembre 1995 -0010-09-15T04:44:23 = 15 septembre -10 Medium 2008-02-05T18:30:30 = 5 fevr. 2008 1995-12-22T09:05:02 = 22 dec. 1995 -0010-09-15T04:44:23 = 15 sept. -10 Short 2008-02-05T18:30:30 = 05/02/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/09/-10 Default 2008-02-05T18:30:30 = 5 fevr. 2008 1995-12-22T09:05:02 = 22 dec. 1995 -0010-09-15T04:44:23 = 15 sept. -10 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = mardi 5 fevrier 2008 18:30:30 UTC 1995-12-22T09:05:02 = vendredi 22 decembre 1995 09:05:02 UTC -0010-09-15T04:44:23 = samedi 15 septembre -10 04:44:23 UTC Long 2008-02-05T18:30:30 = 5 fevrier 2008 18:30:30 UTC 1995-12-22T09:05:02 = 22 decembre 1995 09:05:02 UTC -0010-09-15T04:44:23 = 15 septembre -10 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 fevr. 2008 18:30:30 1995-12-22T09:05:02 = 22 dec. 1995 09:05:02 -0010-09-15T04:44:23 = 15 sept. -10 04:44:23 Short 2008-02-05T18:30:30 = 05/02/08 18:30 1995-12-22T09:05:02 = 22/12/95 09:05 -0010-09-15T04:44:23 = 15/09/-10 04:44 Default 2008-02-05T18:30:30 = 5 fevr. 2008 18:30:30 1995-12-22T09:05:02 = 22 dec. 1995 09:05:02 -0010-09-15T04:44:23 = 15 sept. -10 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 mar. 1995-12-22T09:05:02 = 22 ven. -0010-09-15T04:44:23 = 15 sam. HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/M) 2008-02-05T18:30:30 = 5/2 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/9 MEd (EEE d/M) 2008-02-05T18:30:30 = mar. 5/2 1995-12-22T09:05:02 = ven. 22/12 -0010-09-15T04:44:23 = sam. 15/9 MMd (d/MM) 2008-02-05T18:30:30 = 5/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 MMM (LLL) 2008-02-05T18:30:30 = fevr. 1995-12-22T09:05:02 = dec. -0010-09-15T04:44:23 = sept. MMMd (d MMM) 2008-02-05T18:30:30 = 5 fevr. 1995-12-22T09:05:02 = 22 dec. -0010-09-15T04:44:23 = 15 sept. MMMdd (dd MMM) 2008-02-05T18:30:30 = 05 fevr. 1995-12-22T09:05:02 = 22 dec. -0010-09-15T04:44:23 = 15 sept. MMMEd (E d MMM) 2008-02-05T18:30:30 = mar. 5 fevr. 1995-12-22T09:05:02 = ven. 22 dec. -0010-09-15T04:44:23 = sam. 15 sept. MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 fevrier 1995-12-22T09:05:02 = 22 decembre -0010-09-15T04:44:23 = 15 septembre MMMMEd (EEE d MMMM) 2008-02-05T18:30:30 = mar. 5 fevrier 1995-12-22T09:05:02 = ven. 22 decembre -0010-09-15T04:44:23 = sam. 15 septembre mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (M/yyyy) 2008-02-05T18:30:30 = 2/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 9/-010 yMEd (EEE d/M/yyyy) 2008-02-05T18:30:30 = mar. 5/2/2008 1995-12-22T09:05:02 = ven. 22/12/1995 -0010-09-15T04:44:23 = sam. 15/9/-010 yMMM (MMM y) 2008-02-05T18:30:30 = fevr. 2008 1995-12-22T09:05:02 = dec. 1995 -0010-09-15T04:44:23 = sept. -10 yMMMEd (EEE d MMM y) 2008-02-05T18:30:30 = mar. 5 fevr. 2008 1995-12-22T09:05:02 = ven. 22 dec. 1995 -0010-09-15T04:44:23 = sam. 15 sept. -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = fevrier 2008 1995-12-22T09:05:02 = decembre 1995 -0010-09-15T04:44:23 = septembre -10 yQ ('T'Q y) 2008-02-05T18:30:30 = T1 2008 1995-12-22T09:05:02 = T4 1995 -0010-09-15T04:44:23 = T3 -10 yQQQ (QQQ y) 2008-02-05T18:30:30 = T1 2008 1995-12-22T09:05:02 = T4 1995 -0010-09-15T04:44:23 = T3 -10 yyMM (MM/yy) 2008-02-05T18:30:30 = 02/08 1995-12-22T09:05:02 = 12/95 -0010-09-15T04:44:23 = 09/-10 yyMMM (MMM yy) 2008-02-05T18:30:30 = fevr. 08 1995-12-22T09:05:02 = dec. 95 -0010-09-15T04:44:23 = sept. -10 yyMMMd (d MMM yy) 2008-02-05T18:30:30 = 5 fevr. 08 1995-12-22T09:05:02 = 22 dec. 95 -0010-09-15T04:44:23 = 15 sept. -10 yyMMMEEEd (EEE d MMM yy) 2008-02-05T18:30:30 = mar. 5 fevr. 08 1995-12-22T09:05:02 = ven. 22 dec. 95 -0010-09-15T04:44:23 = sam. 15 sept. -10 yyQ ('T'Q yy) 2008-02-05T18:30:30 = T1 08 1995-12-22T09:05:02 = T4 95 -0010-09-15T04:44:23 = T3 -10 yyQQQQ (QQQQ yy) 2008-02-05T18:30:30 = 1er trimestre 08 1995-12-22T09:05:02 = 4e trimestre 95 -0010-09-15T04:44:23 = 3e trimestre -10 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = fevrier 2008 1995-12-22T09:05:02 = decembre 1995 -0010-09-15T04:44:23 = septembre -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week lundi SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.16.2 2013-08-25 DateTime::Locale::fr_LU(3)
All times are GMT -4. The time now is 02:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy