Sponsored Content
Top Forums Shell Programming and Scripting Implementing operators on multiple fields Post 302814409 by kekanap on Wednesday 29th of May 2013 11:40:17 AM
Old 05-29-2013
can we implement that on the rest:
Code:
awk -F',' '$14==9100' *_201304*.csv|wc -l > pax1;
awk -F',' '$14==9101' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9102' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9103' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9104' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9105' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9106' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9150' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9151' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9152' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9153' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9200' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9201' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9203' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9300' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9301' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9302' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9303' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9304' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9305' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9400' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9401' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9510' *_201304*.csv|wc -l >>pax1;
awk -F',' '$14==9511' *_201304*.csv|wc -l >>pax1


Last edited by Franklin52; 05-30-2013 at 03:41 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Programming

Bit-fields and Bitwise operators

Hi, Is it possible to use bitwise operators in bit fields? For example: typedef struct Mystruct { unsigned char A :1 ; unsigned char B :1 ; } Mystruct; and assume struct Mystruct STR_1S, STR_2S, tempSTRS = {0}; then the following line: tempSTRS = STR_1S & STR_2S; gives the... (3 Replies)
Discussion started by: amatsaka
3 Replies

2. Shell Programming and Scripting

join on multiple fields

Is it possible to do a join on multiple fields of two files? I am trying to do something like join -t, -1 2,3 -2 2,3 -o 2.1,2.2,2.3,1.3 filea fileb I want the join to be on columns 2 and 3 of filea and columns 2 and 3 of fileb. What is hapenning is that the second file that I want to do the join... (1 Reply)
Discussion started by: reggiej
1 Replies

3. Shell Programming and Scripting

sort on multiple fields

hello all I have a file names xxx with data like 1,2,3,12 1,3,6,12 1,3,5,12 2,4,6,12 6,5,6,12 4,2,7,12 4,1,3,12 I wish to sort this file xxx on first three fields in ascending order. OUPUT should be like 1,2,3,12 1,3,5,12 1,3,6,12 2,4,6,12 (4 Replies)
Discussion started by: vasuarjula
4 Replies

4. Shell Programming and Scripting

sort on multiple fields

Hello All I have data in a flat file with numeric and aplha numeric datatypes. Now i have to sort on multiple fileds. Can any body please give me the sort code? i am particularly confused about the sort code like sort -n +0 -1 +1 -2 .... (1 Reply)
Discussion started by: vasuarjula
1 Replies

5. UNIX for Dummies Questions & Answers

Need help with Join on multiple fields

Hi, I need help with the join command I have 2 files that I want to join on multiple fields. I want to return all records from file 1 I also want empty fields in my joined file if there isn't a match in file 2 I have already sorted them so I know they are in the same order. file1 ... (0 Replies)
Discussion started by: shunter0810
0 Replies

6. UNIX for Dummies Questions & Answers

issue with multiple logical operators

Hi, shell is /bin/ksh I am trying to do the following in my code.. but its showing me an error if ] && ] ]]; then echo "id is $ida and chk_dy is $chk_dy" fi the error I get is syntax error at line 23 : `"$ida"' unexpected I need to execute the... (2 Replies)
Discussion started by: nss280
2 Replies

7. UNIX for Dummies Questions & Answers

Formatting Multiple fields on 1 line to multiple rows

I'm trying extract a number of filename fields from a log file and copy them out as separate rows in a text file so i can load them into a table. I'm able to get the filenames but the all appear on one line. I tried using the cut command with the -d (delimiter) option but cant seem to make it... (1 Reply)
Discussion started by: Sinbad-66
1 Replies

8. Shell Programming and Scripting

ksh Multiple Pattern Matching Operators

I figured this would be simple, but I am stuck. Variable longpath="/dir1/dir2/dir3/filename.stuff.morestuff.garbage" I want to end up with just "filename.extra.moreextra". So, I want to get rid of the path and .garbage I want to do this with just ksh internals. So, no sed,grep,awk,expr,... (4 Replies)
Discussion started by: Topaz
4 Replies

9. Shell Programming and Scripting

How to use logical operators in multiple if statement

Hi I want to send a status mail if daily or weekly or monthly batch completed or aborted. Here is the code. if && && || Else if && && || Else if && && || then mailx –s “Status Report” sumone@sumthing.com else print ”try again” Plz suggest the changes. (3 Replies)
Discussion started by: Avi
3 Replies

10. Shell Programming and Scripting

Repeating Multiple Fields

I am trying to find a way to repeat fields. I am not really sure how to explain it so let me just post a sample and what I want it to look like. 888123 66232 18 1 19 44422 11 7 23 881133 66231 33 1 34 ... (4 Replies)
Discussion started by: DerangedNick
4 Replies
OCR4GAMERA(1)															     OCR4GAMERA(1)

NAME
ocr4gamera - OCR system using the Gamera framework USAGE
ocr4gamera -x <traindata> [options] <imagefile> OPTIONS
-v <int>, --verbosity=<int> Set verbosity level to <int>. Possible values are 0 (default): silent operation; 1: information on progress; >2: segmentation info is written to PNG files with prefix debug_. -h, --help Display help and exit. -d, --deskew Do a skew correction (recommended). -f, --filter Filter out very large (images) and very small components (noise). -a, --automatic-group Autogroup glyphs with classifier. -x <file>, --xmlfile=<file> Read training data from <file>. -o <xml>, --output=<xml> Write recognized text to file <xml> (otherwise it is written to stdout). -c <csv>, --extra_chars_csvfile=<csv> Read additional class name conversions from file <csv>. <csv> must contain one conversion per line. -R <rules>, --heuristic_rules=<rules> Apply heuristic rules <rules> for disambiguation of some chars. <rules> can be roman (default) or none (for no rules). -D, --dictionary-correction Correct words using a dictionary (requires aspell or ispell). -L <lang>, --dictionary-language=<lang> Use <lang> as language for aspell (when option -D is set). -e <int>, --edit-distance=<int> Correct words only when edit distance not more than <int>. OCR4GAMERA(1)
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy