Sponsored Content
Top Forums Shell Programming and Scripting Search/grep on row and column wise Post 302947745 by Don Cragun on Sunday 21st of June 2015 02:44:46 PM
Old 06-21-2015
In case the database might be switched to use expected spaces in names (such as NEW YORK instead of underscores (as in NEW_YORK), you might want to change:
Code:
FNR==1          {gsub (" ", "", KEY)
                 split (KEY, Karr, "&")

in the 2nd script to:
Code:
FNR==1          {split (KEY, Karr, " *& *")

I don't know how this database is going to account for the fact that the five boroughs of New York City are five different counties (The Bronx is in Bronx county, Brooklyn is in Kings county, Manhattan is in New York county, Queens is in Queens county, and Staten Island is in Richmond county).
This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix addition ( Row wise)

Hi I have a file like a,1 b,2 d,3 a,2 b,3 c,7 Result Desired: a,3 b,5 d,3 c,7 i.e on the bases of 1st field the addition is done of the 2nd field and result printed out. (3 Replies)
Discussion started by: gauravgoel
3 Replies

2. Shell Programming and Scripting

Row to column converter using Awk or grep?

Hello, Can someone please help me on this.:confused: I have a file which has more than 1 million lines (XML file). What I need is: Search for "abcd" in the input file > output the result into a output.txt (colloum1) Search for "efghi" in the input file > output the result in to... (3 Replies)
Discussion started by: Needhelp2
3 Replies

3. Shell Programming and Scripting

Search a file column wise and delete it

i have a file which has a column that is unique i am intending to serach it and if it is there to remove the row. the file looks like ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT 15 ,rig ,34 ,56 ,87 ,177 ,59 % ,PASS 23 ,wel ,45 ,76 ,56 ,177 ,59 % ... (0 Replies)
Discussion started by: gotam
0 Replies

4. Shell Programming and Scripting

Search a file column wise and delete it

Scottn, m really sorry but i have not got my answer yet. my concern is how to delete the row !!! i have a file which has a column that is unique i am intending to serach it and if it is there to remove the row. the file looks like ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT... (9 Replies)
Discussion started by: gotam
9 Replies

5. Shell Programming and Scripting

awk-gsub on column-wise on each row

awk '{ gsub(/....=/,""); print }' want.dat >final.dat the above awk command which removes all the chars before and including '=' on the entire row. --thats what it meant be.:) but i need to remove text on column-wise on each row. many thanks, EM ---------- Post updated at 10:00 AM... (4 Replies)
Discussion started by: elamurugu
4 Replies

6. Shell Programming and Scripting

search column and delete row if greater than value

Hi, as the title states i need to find a way to search a column for values great than 1000, and if it is, then delete that row. An example 1 7.021 6.967 116.019 4 U 6.980E+07 0.000E+00 e 0 0 0 0 2 8.292 7.908 118.063 3 U 1.440E+07 0.000E+00 e 0 821 814 ... (3 Replies)
Discussion started by: olifu02
3 Replies

7. Shell Programming and Scripting

calculating row-wise standard deviation using awk

Hi, I have a file containing 100,000 rows-by-120 columns and I need to compute for the standard deviation for each row. Any idea on how to calculate row-wise standard deviation using awk? My sample data looks like this: input data: 23 35 12 25 16 17 18 19 29 12 12 26 15 14 15 23 12 12... (2 Replies)
Discussion started by: ida1215
2 Replies

8. Shell Programming and Scripting

Grep the column for a row

I have a problem caught and need to discuss with all you guys. I have a file containing a rows which are separated by “~” For eg. Server~321~UP~Linux~Member 121213~5778~Down~Unix~Provider I want to use the grep which search the row on the basis of columns like the grep... (6 Replies)
Discussion started by: adisky123
6 Replies

9. UNIX for Dummies Questions & Answers

Print row wise

Hi Help, I have an I/p, which looks like --- FF GG HH I want the o/p to be like --- FF GG HH. How we can do that? Thanks (7 Replies)
Discussion started by: Indra2011
7 Replies

10. Shell Programming and Scripting

Search string in multiple files and display column wise

I have 3 files. Each of those files have the same number of records, however certain records have different values. I would like to grep the field in ALL 3 files and display the output with only the differences in column wise and if possible line number File1 Name = Joe Age = 33... (3 Replies)
Discussion started by: sidnow
3 Replies
SALLIERE(1)						      General Commands Manual						       SALLIERE(1)

NAME
salliere -- Duplicate Bridge Scorer SYNOPSIS
salliere [options] -- [commands] [boards.csv] [names.csv] DESCRIPTION
This manual page documents briefly the salliere command. salliere scores, matchpoints and nicely formats the boards for a duplicate pairs evening. The command line is a list of commands followed by two comma-separated files on which to operate. The boards file must contain lines with at least board number, NS pair number, EW pair number, Contract, Declarer and either tricks or the contract must include whether it made (=) went down (-tricks) or made over tricks (+tricks). The names file must list at least pair number followed by two comma separated names. The commands will add tricks, scores and matchpoint columns to the boards file and total matchpoints, percentages and local/orange points to the names file as appropriate. By default the commands which print results will do so as ascii to stdout. This can be changed with the --output=format:file option. For- mats are either pdf, html or txt and file is the path to a file or - for stdout. The commands which format the output require the extra fields to be added either by hand or with the appropriate commands so they can be printed. COMMANDS
Here are a list of the available commands and what they do: verify Checks all the boards look sane; can be used with the --setsize option to check the movement score Calculates tricks and score for each contract matchpoint Calculates match points for each hand ximp Calculates cross-imps for each hand parimp Calculates imps vs par for each hand total Calculates the total match points for each pair handicap Calculates the result after applying handicaps for each player localpoint Calculates local or orange points for each pair results Prints all the pairs in order with their total match points, percentages and local/orange points as appropriate matrix Prints a matrix of match points gained on each board by each pair boards Prints out each board with pairs, contract, results and match points ecats-upload Upload results to ecats bridge website scoreteams Prints out the results of the boards as a team of 4 or team of 8 match OPTIONS
Here are a list of the available options and what they do: --help Prints the help text --setsize=N Check the movement based on sets of size N. Also used when printing the matrix to batch the results --orange Prints "OP" rather than "LP" --ximp Adjusts output for IMPs rather than matchpoints --title=title Changes the title on the output --output=format:file Changes the output format and file. Possible formats are pdf, html, htmlfrag, csv or txt. A file of '-' corresponds to stdout. --with-par Prints the par result along with the boards --trickdata=file The tricks which can be made on each board for calculating par --handcapdata Current handicaps for individuals --with-handicaps Prints the handicaps with each pair --handcap-normalizer When handicapping, center around this number as par --teamsize=N Number of players in a team (4 or 8) for overall team scoring --teamprefix=prefix The prefix on each pair number to identify which team they are on (eg CU if the pairs are named CU1, CU2, ...) --ecats-options=key:value,key2:value2,... Options used to send scores to ecats. ECATS OPTIONS
Here are a list of the available options to ecats and what they do. clubName name of club (required) session ECATS session number (required) phone contact phone number (required) country club country (required) name contact name fax contact fax number email contact email town club town county club county date event date event event name AUTHOR
This manual page was written by Matthew Johnson <debian@matthew.ath.cx>. Permission is granted to copy, distribute and/or modify this docu- ment under the terms of the GNU General Public License, Version 2 as published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. SALLIERE(1)
All times are GMT -4. The time now is 01:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy