Sponsored Content
Top Forums Shell Programming and Scripting Code to exclude lines with similar values Post 302776551 by rdrtx1 on Wednesday 6th of March 2013 01:17:35 PM
Old 03-06-2013
try:
Code:
awk '
NR==FNR {if ($3!=cat) a[$1$2$4$5]=$0; next}
$NF==cat
$3==cat {if (!a[$1$2$4$5]) print }
' cat="XXX" infile infile

This User Gave Thanks to rdrtx1 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

exclude lines in a loop

I use while do - done loop in my shell script. It is working as per my expectations. But I do not want to process all the lines. I am finding it difficult to exclude certain lines. 1) I do not want to process blank lines as well as lines those start with a space " " 2) I do not want to... (2 Replies)
Discussion started by: shantanuo
2 Replies

2. Shell Programming and Scripting

Joining multiple files based on one column with different and similar values (shell or perl)

Hi, I have nine files looking similar to file1 & file2 below. File1: 1 ABCA1 1 ABCC8 1 ABR:N 1 ACACB 1 ACAP2 1 ACOT1 1 ACSBG 1 ACTR1 1 ACTRT 1 ADAMT 1 AEN:N 1 AKAP1File2: 1 A4GAL 1 ACTBL 1 ACTL7 (4 Replies)
Discussion started by: seqbiologist
4 Replies

3. Shell Programming and Scripting

awk to search similar strings and add their values

Hi, I have a text file with the following content: monday,20 tuesday,10 wednesday,29 monday,10 friday,12 wednesday,14 monday,15 thursday,34 i want the following output: monday,45 tuesday,10 wednesday,43 friday,12 (3 Replies)
Discussion started by: prashu_g
3 Replies

4. Shell Programming and Scripting

removing lines with similar values from file

Hello, got a file with this structure: 33274 171030 02/29/2012 37897 P_GEH 2012-02-29 10:31:26 33275 171049 02/29/2012 38132 P_GEH 2012-02-29 10:35:27 33276 171058 02/29/2012 38515 P_GEH 2012-02-29 10:43:26 33277 170748 02/29/2012 40685 P_KOM ... (3 Replies)
Discussion started by: krecik28
3 Replies

5. Shell Programming and Scripting

How to find similar values in different files

Hello, I have 4 files like this: file1: cg24163616 15 297 cg09335911 123 297 cg13515808 565 776 cg12242345 499 705 cg22905282 225 427 cg16674860 286 779 cg14251734 303 724 cg19316579 211 717 cg00612625 422 643 file2:... (2 Replies)
Discussion started by: linseyr
2 Replies

6. Shell Programming and Scripting

File lines starts with # not processed or exclude that lines

I have requirement in my every files starting lines have # needs to be not processing or exclude the that lines. I have written a code like below, but now working as expected getting ERROR" line 60: 1 #!/bin/sh 2 echo ======= LogManageri start ========== 3 4 #This directory is... (1 Reply)
Discussion started by: Chenchireddy
1 Replies

7. Shell Programming and Scripting

File lines starts with # not processed or exclude that lines from processing

I have a file like below #Fields section bald 1234 2345 456 222 abcs dddd dddd ssss mmmm mmm mmm i need do not process a files stating with # I was written code below while read -r line do if then echo ${line} >> elif then ... (3 Replies)
Discussion started by: Chenchireddy
3 Replies

8. Shell Programming and Scripting

Perl next if @array (exclude a list of values)

I'm trying to exlude a list of values with perl to process while reading in a file. Is there a way to use the next if with a list? Example: @array = qw(val1 val2 val3 val6); while (<>) { next if $_ =~ @array; # values I don't want to process here print; # process the rest here }... (8 Replies)
Discussion started by: timj123
8 Replies

9. Shell Programming and Scripting

Add values of similar patterns with awk

so my output is this: session_closed=157 session_opened=151 session_closed=18 session_opened=17 there are two patterns here, but with different values. the two patterns are "session_opened" and "session_closed". i expect there will be many more other patterns. what i want to do is... (8 Replies)
Discussion started by: SkySmart
8 Replies

10. Shell Programming and Scripting

Extract and exclude rows based on duplicate values

Hello I have a file like this: > cat examplefile ghi|NN603762|eee mno|NN607265|ttt pqr|NN613879|yyy stu|NN615002|uuu jkl|NN607265|rrr vwx|NN615002|iii yzA|NN618555|ooo def|NN190486|www BCD|NN628717|ppp abc|NN190486|qqq EFG|NN628717|aaa HIJ|NN628717|sss > I can sort the file by... (5 Replies)
Discussion started by: CHoggarth
5 Replies
DateTime::Locale::gez(3)				User Contributed Perl Documentation				  DateTime::Locale::gez(3)

NAME
DateTime::Locale::gez SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'gez' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Geez. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) XXX XXX XXX XXX XXX XXXX XXX Abbreviated (format) XXX XXX XXX XXX XXX XXX XXX Narrow (format) X X X X X X X Wide (stand-alone) XXX XXX XXX XXX XXX XXXX XXX Abbreviated (stand-alone) XXX XXX XXX XXX XXX XXX XXX Narrow (stand-alone) X X X X X X X Months Wide (format) XXX XXX XXX XXX XXXX XXX XXX XXX XXX XXX XXX XXX Abbreviated (format) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Narrow (format) X X X X X X X X X X X X Wide (stand-alone) XXX XXX XXX XXX XXXX XXX XXX XXX XXX XXX XXX XXX Abbreviated (stand-alone) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Narrow (stand-alone) X X X X X X X X X X X X Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated X/X X/X Narrow X/X X/X Date Formats Full 2008-02-05T18:30:30 = XXXX 05 XXX XXXX 2008 X/X 1995-12-22T09:05:02 = XXXX 22 XXX XXXX 1995 X/X -0010-09-15T04:44:23 = XXXXX 15 XXX XXXX -10 X/X Long 2008-02-05T18:30:30 = 05 XXX 2008 1995-12-22T09:05:02 = 22 XXX 1995 -0010-09-15T04:44:23 = 15 XXX -10 Medium 2008-02-05T18:30:30 = 05-XXX-2008 1995-12-22T09:05:02 = 22-XXX-1995 -0010-09-15T04:44:23 = 15-XXX--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 = 05-XXX-2008 1995-12-22T09:05:02 = 22-XXX-1995 -0010-09-15T04:44:23 = 15-XXX--10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 XXX UTC 1995-12-22T09:05:02 = 9:05:02 XXX UTC -0010-09-15T04:44:23 = 4:44:23 XXX UTC Long 2008-02-05T18:30:30 = 6:30:30 XXX UTC 1995-12-22T09:05:02 = 9:05:02 XXX UTC -0010-09-15T04:44:23 = 4:44:23 XXX UTC Medium 2008-02-05T18:30:30 = 6:30:30 XXX 1995-12-22T09:05:02 = 9:05:02 XXX -0010-09-15T04:44:23 = 4:44:23 XXX Short 2008-02-05T18:30:30 = 6:30 XXX 1995-12-22T09:05:02 = 9:05 XXX -0010-09-15T04:44:23 = 4:44 XXX Default 2008-02-05T18:30:30 = 6:30:30 XXX 1995-12-22T09:05:02 = 9:05:02 XXX -0010-09-15T04:44:23 = 4:44:23 XXX Datetime Formats Full 2008-02-05T18:30:30 = XXXX 05 XXX XXXX 2008 X/X 6:30:30 XXX UTC 1995-12-22T09:05:02 = XXXX 22 XXX XXXX 1995 X/X 9:05:02 XXX UTC -0010-09-15T04:44:23 = XXXXX 15 XXX XXXX -10 X/X 4:44:23 XXX UTC Long 2008-02-05T18:30:30 = 05 XXX 2008 6:30:30 XXX UTC 1995-12-22T09:05:02 = 22 XXX 1995 9:05:02 XXX UTC -0010-09-15T04:44:23 = 15 XXX -10 4:44:23 XXX UTC Medium 2008-02-05T18:30:30 = 05-XXX-2008 6:30:30 XXX 1995-12-22T09:05:02 = 22-XXX-1995 9:05:02 XXX -0010-09-15T04:44:23 = 15-XXX--10 4:44:23 XXX Short 2008-02-05T18:30:30 = 05/02/08 6:30 XXX 1995-12-22T09:05:02 = 22/12/95 9:05 XXX -0010-09-15T04:44:23 = 15/09/-10 4:44 XXX Default 2008-02-05T18:30:30 = 05-XXX-2008 6:30:30 XXX 1995-12-22T09:05:02 = 22-XXX-1995 9:05:02 XXX -0010-09-15T04:44:23 = 15-XXX--10 4:44:23 XXX 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 XXX 1995-12-22T09:05:02 = 22 XXX -0010-09-15T04:44:23 = 15 XXX 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 XXX 1995-12-22T09:05:02 = 9:05 XXX -0010-09-15T04:44:23 = 4:44 XXX 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 XXX 1995-12-22T09:05:02 = 9:05:02 XXX -0010-09-15T04:44:23 = 4:44:23 XXX M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = XXX, 2-5 1995-12-22T09:05:02 = XXX, 12-22 -0010-09-15T04:44:23 = XXX, 9-15 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 = XXX 1995-12-22T09:05:02 = XXX -0010-09-15T04:44:23 = XXX MMMd (MMM d) 2008-02-05T18:30:30 = XXX 5 1995-12-22T09:05:02 = XXX 22 -0010-09-15T04:44:23 = XXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XXX XXX 5 1995-12-22T09:05:02 = XXX XXX 22 -0010-09-15T04:44:23 = XXX XXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXX 5 1995-12-22T09:05:02 = XXX 22 -0010-09-15T04:44:23 = XXX 15 MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 XXX 1995-12-22T09:05:02 = 22 XXX -0010-09-15T04:44:23 = 15 XXX MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XXX XXX 5 1995-12-22T09:05:02 = XXX XXX 22 -0010-09-15T04:44:23 = XXX XXX 15 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 (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = XXX, 2008-2-5 1995-12-22T09:05:02 = XXX, 1995-12-22 -0010-09-15T04:44:23 = XXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXX 1995-12-22T09:05:02 = 1995 XXX -0010-09-15T04:44:23 = -10 XXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XXX, 2008 XXX 5 1995-12-22T09:05:02 = XXX, 1995 XXX 22 -0010-09-15T04:44:23 = XXX, -10 XXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXX 1995-12-22T09:05:02 = 1995 XXX -0010-09-15T04:44:23 = -10 XXX yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 yyMM (MM/yy) 2008-02-05T18:30:30 = 02/08 1995-12-22T09:05:02 = 12/95 -0010-09-15T04:44:23 = 09/-10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = XXX 2008 1995-12-22T09:05:02 = XXX 1995 -0010-09-15T04:44:23 = XXX -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXX 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.3 2014-06-10 DateTime::Locale::gez(3)
All times are GMT -4. The time now is 11:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy