Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Add values to file in 2 new columns Post 303044033 by jiam912 on Thursday 13th of February 2020 12:34:57 AM
Old 02-13-2020
Thank you Gents, both codes works perfectly .. Many tks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to flip values of two columns and add an extra column

Hi guys, Couldn't find the solution of this problem. Please Help! I have a file- Input_File TC200232 92 30 TC215306 2 74 TC210135 42 14 I want an output file in which if column2>column3, the values are swapped and an additional column with value Rev_Com is... (4 Replies)
Discussion started by: smriti_shridhar
4 Replies

2. UNIX for Dummies Questions & Answers

combine the values from the first two columns within a file

Hello everybody, I have a text file containing 10,000 rows and 5000 columns. The values are separated by a tab. Ex. file_ex.ped 1 mike 0 0 2 1 A A G G C T A G 1 jack 0 0 2 2 T A G T C A A C 1 Mary 0 0 1 2 A T G C A T G C ... I would like a out put file 1 mike 0 0 2 1 AA GG CT AG 1... (7 Replies)
Discussion started by: Unilearn
7 Replies

3. Shell Programming and Scripting

Math operations with file columns values.

Hello everybody, I have some large files containing statistical data. The data is stored in the following generic format: >cat my_file 1, 2, 3 1, 2, 3 1, 2, 3 > The values of columns no.2 and 3 are expressed in bytes. I would like to transform them in Megabytes, by dividing them with... (3 Replies)
Discussion started by: fabian23
3 Replies

4. Shell Programming and Scripting

Copy values from columns matching in those in second file.

Hi All, I have two sets of files. Set 1: 100 text files with extension .txt with names like 1.txt, 2.txt, 3.txt until 100.txt Set 2: One big file with extension .dat The text files have some records in columns like this: 0.7316431 82628 0.7248189 82577 0.7248182 81369 0.7222999... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. UNIX for Dummies Questions & Answers

Subtracting values from 2 columns in a file

Hello, I have a file with 5 columns that looks like this: A1BG chr19 + 58863335 58866549 A1BG chr19 - 58858171 58864865 A2LD1 chr13 - 101182417 101186056 A2LD1 chr13 - 101182417 101241046 A2M chr12 - 9220303 9268558 A2ML1 ... (5 Replies)
Discussion started by: wolf_blue
5 Replies

6. UNIX for Dummies Questions & Answers

Removing columns from a text file that do not have any values in second and third columns

I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns: 4 0.04972604 KLHL28 4 0.0497332 CSTB 4 0.04979822 AIF1 4 0.04983331 DECR2 4 0.04990344 KATNB1 4 4 4 4 How can I remove the trailing... (3 Replies)
Discussion started by: evelibertine
3 Replies

7. Shell Programming and Scripting

for uniq entries add values in corresponding columns

Hi, I have a file as listed below.. What I want to get is for each unique value in column 1 the corresponding values in the rest of the columns should be summed up.. AAK1 0 1 0 11 AAK1 0 0 1 1 AAK1 0 0 1 2... (2 Replies)
Discussion started by: Diya123
2 Replies

8. Shell Programming and Scripting

Add the values in second and third columns with group by on first column.

Hi All, I have a pipe seperated file. I need to add the values in second and third columns with group by on first column. MYFILE_28012012_1115|47|173.90 MYFILE_28012012_1115|4|0.00 MYFILE_28012012_1115|6|22.20 MYFILE_28012012_1116|47|173.90 MYFILE_28012012_1116|4|0.00... (3 Replies)
Discussion started by: angshuman
3 Replies

9. Shell Programming and Scripting

Add values in 2 columns and subtract from third

Hi All, I have a file with thousands of lines in the following format, where Field1=First 8 characters Field2-9-16 characters Field3=17-26 characters I need to add Field 1 and Field2 and subtract the result from Field 3. Field3=Field3 - (Field1 + Field2) 0012.00 0010.00 0001576.53... (4 Replies)
Discussion started by: nua7
4 Replies

10. UNIX for Beginners Questions & Answers

Awk: compare values in two columns of the same file

I'm trying to learn awk, but I've hit a roadblock with this problem. I have a hierarchy stored in a file with 3 columns: id name parentID 4 D 2 2 B 1 3 C 1 1 A 5 I need to check if there are any values in column 3 that are not represented anywhere in column 1. I've tried this: awk '{arr;}... (7 Replies)
Discussion started by: kaktus
7 Replies
ISOQUERY(1)															       ISOQUERY(1)

NAME
isoquery - Search and display various ISO codes (country, language, ...) SYNOPSIS
isoquery [options] [file] [ISO codes] DESCRIPTION
This manual page documents briefly the isoquery command. It can be used to generate a tabular output of the ISO standard codes provided by the package iso-codes. It parses the XML files and shows all included ISO codes or just matching entries, if specified on the command line. Moreover, it's possible to get all available translations for the ISO standard. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes ('-'). isoquery supports the following options: -i standard, --iso=standard The ISO standard to use. Possible values: 639, 639-3, 3166, 3166-2, 4217, 15924 (default: 3166). -x file, --xmlfile=file Use another XML file with ISO data (default: /usr/share/xml/iso-codes/iso_3166.xml). -l locale, --locale=locale Use this locale for output. -n, --name Name for the supplied codes (default). -o, --official_name Official name for the supplied codes. This may be the same as --name (only applies to ISO 3166). -c, --common_name Common name for the supplied codes. This may be the same as --name (only applies to ISO 3166). -0, --null Separate entries with a NULL character instead of newline. -h, --help Show summary of options. -v, --version Show program version and copyright. EXAMPLES
If called without any command line options, isoquery will put out a table of all ISO 3166 codes. The first three columns contain the alpha-2 code, the alpha-3 code, and the numerical code assigned to the country listed in the fourth column. $ isoquery AF AFG 004 Afghanistan [...] ZW ZWE 716 Zimbabwe If you need only some countries, you can specify any of the codes in the first three columns to cut down the output. $ isoquery so nor 484 SO SOM 706 Somalia NO NOR 578 Norway MX MEX 484 Mexico Should you need the translations of the countries' names, just specify in which locale you'd like to see the output. Please note that the original English name will be shown if there is no translation available for the specified locale. $ isoquery --locale=nl fr de es FR FRA 250 Frankrijk DE DEU 276 Duitsland ES ESP 724 Spanje All of the above works for different ISO standards as well, so you can switch to the more extensive standard ISO 3166-2 by using the --iso command line option. The columns are country code, subset type (e.g. State, Province, etc.), ISO 3166-2 code, parent, and name. The fourth column (parent) may be empty. $ isoquery --iso=3166-2 AD Parish AD-07 Andorra la Vella [...] ZW Province ZW-MI Midlands For ISO 639, the first three columns are the ISO 639 2B code, the ISO 639 2T code and the ISO 639-1 code. The third column may be empty. $ isoquery --iso=639 aar aar aa Afar abk abk ab Abkhazian ace ace Achinese [...] zun zun Zuni zxx zxx No linguistic content; Not applicable zza zza Zaza; Dimili; Dimli; Kirdki; Kirmanjki; Zazaki You can trim down the results by specifying only some codes. Moreover, the option to get translated names is also available. $ isoquery --iso=639 --locale=pt vi bo kl vie vie vi Vietnamita tib bod bo tibetano kal kal kl Kalaallisut; Greenlandic If you want to use ISO 639-3, the displayed columns are id, scope, type, part 1 code, part 2 code, and the language name. Both part 1 and part 2 may be empty. $ isoquery -i 639-3 aal new spa guc aal I L Afade new I L new Bhasa, Nepal spa I L es spa Spanish guc I L Wayuu You can get selected translations of currency names from the ISO 4217 standard by using the following command. The first two columns are the alpha-3 code and the numerical code assigned to the currency. $ isoquery --iso=4217 --locale=da cad 392 CAD 124 Canadisk dollar JPY 392 Yen If you need to get script names, you can use the ISO 15924 table. The first two columns are the alpha-4 code and the numerical code assigned to the script. $ isoquery --iso=15924 jpan latn 280 Jpan 413 Japanese (alias for Han + Hiragana + Katakana) Latn 215 Latin Visp 280 Visible Speech FILES
By default, the XML files provided by the iso-codes package will be used. /usr/share/xml/iso-codes/iso_639.xml /usr/share/xml/iso-codes/iso_639_3.xml /usr/share/xml/iso-codes/iso_3166.xml /usr/share/xml/iso-codes/iso_3166_2.xml /usr/share/xml/iso-codes/iso_4217.xml /usr/share/xml/iso-codes/iso_15924.xml AUTHOR
Tobias Quathamer <toddy@debian.org> 1.7 2012-01-23 ISOQUERY(1)
All times are GMT -4. The time now is 01:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy