Sponsored Content
Top Forums Shell Programming and Scripting Adding columns from 2 files with variable number of columns Post 303023011 by vgersh99 on Monday 10th of September 2018 12:30:06 PM
Old 09-10-2018
you can think of this as short hand for a long hand mnemonic of:
Code:
if (i==NF/2)
   output ORS
else
   output OFS

This User Gave Thanks to vgersh99 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding columns to excel files using Perl

How do I add 4 columns to an excel file using Perl? The 4 headers for those columns will all have different names? Please help and I greatly appreciate... (1 Reply)
Discussion started by: dolo21taf
1 Replies

2. Shell Programming and Scripting

comparing files - adding/subtracting/formating columns

I have two files: file1.txt: FS Total Used Free Used% /u01 10000 8000 2000 80% /u02 10000 8000 2000 80% /u03 10000 8000 2000 80% /u04 10000 8000 2000 80% /u05 10000 8000 2000 80% /u06 10000 8000 2000 80% /u07 10000 8000 2000 80% /u10 10000 5000 5000 50% file2.txt:... (7 Replies)
Discussion started by: oabdalla
7 Replies

3. Shell Programming and Scripting

awk adding columns from different files

Hi, I have two files and I need to add column 3 of file1 to column 3 of file 2 > file3 I also need to repeat for column 4. Thanks (1 Reply)
Discussion started by: dsstamps
1 Replies

4. Shell Programming and Scripting

Adding columns of two files

Hello everyone, I have two files containing 6 columns and thousands of rows. I want to add them (i.e. first column of first file + first column of second file and so on) and print the output in a third file. Can you please help me. Thanks a lot (7 Replies)
Discussion started by: chandra321
7 Replies

5. Shell Programming and Scripting

merging files and adding special columns

Hi everyone, I got a problem with merging files and hoped one of you would have an idea how to approach this issue. I tried it with awk, but didn't get far. This is what I have: I got 40 files looking like the ones below. All have three columns but the number of rows differs (20000 to 50000).... (6 Replies)
Discussion started by: TuAd
6 Replies

6. UNIX for Dummies Questions & Answers

Adding new columns to txt files

Dear all, I have a question. I have a txt.file as below. i want to add 3 more columns: column3=conlum 2*column2; column4=(1-column2)*(1-column2); column5=1-column3-column4. Do you know how to do it? Thanks a lot! file: column1 column2 a 1 b 20 c 30 d 3 ... (2 Replies)
Discussion started by: forevertl
2 Replies

7. Shell Programming and Scripting

Adding Multiple Files via Columns

I have a number of files with multiple rows that I need to add together. Let say I have 10 files: Each file has a great number of rows and columns. I need to add these files together the following way. In other words, If, for example, file A occupies Columns 1 to 19, I want to add file B... (7 Replies)
Discussion started by: Ernst
7 Replies

8. Shell Programming and Scripting

Adding columns with values dependent on existing columns

Hello I have a file as below chr1 start ref alt code1 code2 chr1 18884 C CAAAA 2 0 chr1 135419 TATACA T 2 0 chr1 332045 T TTG 0 2 chr1 453838 T TAC 2 0 chr1 567652 T TG 1 0 chr1 602541 ... (2 Replies)
Discussion started by: plumb_r
2 Replies

9. Shell Programming and Scripting

Adding info to end of line if two columns match from files with different separators

I have two files (csv and vcf) which look exactly like this S1.csv func,gene,start,info "exonic","AL","2309","het" "exonic","NEF","6912","hom"S1.vcf ##fileinfo #CHROM POS ID INFO chr1 4567 rs323211 1/1:84,104,99 chr4 2309 rs346742 1/1:27,213,90 chr6 5834 ... (5 Replies)
Discussion started by: Sarah_19
5 Replies

10. Shell Programming and Scripting

Request: How to Parse dynamic SQL query to pad extra columns to match the fixed number of columns

Hello All, I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns. So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Discussion started by: vikas_trl
7 Replies
DUMPKEYS(1)						      General Commands Manual						       DUMPKEYS(1)

NAME
dumpkeys - dump keyboard translation tables SYNOPSIS
dumpkeys [ -hilfn -ccharset --help --short-info --long-info --numeric --full-table --funcs-only --keys-only --compose-only --charset=charset ] DESCRIPTION
dumpkeys writes, to the standard output, the current contents of the keyboard driver's translation tables, in the format specified by keymaps(5). Using the various options, the format of the output can be controlled and also other information from the kernel and the programs dump- keys(1) and loadkeys(1) can be obtained. OPTIONS
-h --help Prints the program's version number and a short usage message to the program's standard error output and exits. -i --short-info Prints some characteristics of the kernel's keyboard driver. The items shown are: Keycode range supported by the kernel This tells what values can be used after the keycode keyword in keytable files. See keymaps(5) for more information and the syntax of these files. Number of actions bindable to a key This tells how many different actions a single key can output using various modifier keys. If the value is 16 for example, you can define up to 16 different actions to a key combined with modifiers. When the value is 16, the kernel probably knows about four modifier keys, which you can press in different combinations with the key to access all the bound actions. Ranges of action codes supported by the kernel This item contains a list of action code ranges in hexadecimal notation. These are the values that can be used in the right hand side of a key definition, ie. the vv's in a line keycode xx = vv vv vv vv (see keymaps(5) for more information about the format of key definition lines). dumpkeys(1) and loadkeys(1) support a sym- bolic notation, which is preferable to the numeric one, as the action codes may vary from kernel to kernel while the symbolic names usually remain the same. However, the list of action code ranges can be used to determine, if the kernel actually sup- ports all the symbols loadkeys(1) knows, or are there maybe some actions supported by the kernel that have no symbolic name in your loadkeys(1) program. To see this, you compare the range list with the action symbol list, see option --long-info below. Number of function keys supported by kernel This tells the number of action codes that can be used to output strings of characters. These action codes are traditionally bound to the various function and editing keys of the keyboard and are defined to send standard escape sequences. However, you can redefine these to send common command lines, email addresses or whatever you like. Especially if the number of this item is greater than the number of function and editing keys in your keyboard, you may have some "spare" action codes that you can bind to AltGr-letter combinations, for example, to send some useful strings. See loadkeys(1) for more details. Function strings You can see you current function key definitions with the command dumpkeys --funcs-only -l --long-info This option instructs dumpkeys to print a long information listing. The output is the same as with the --short-info appended with the list of action symbols supported by loadkeys(1) and dumpkeys(1), along with the symbols' numeric values. -n --numeric This option causes dumpkeys to by-pass the conversion of action code values to symbolic notation and to print the in hexadecimal format instead. -f --full-table This makes dumpkeys skip all the short-hand heuristics (see keymaps(5)) and output the key bindings in the canonical form. First a keymaps line describing the currently defined modifier combinations is printed. Then for each key a row with a column for each modi- fier combination is printed. For example, if the current keymap in use uses seven modifiers, every row will have seven action code columns. This format can be useful for example to programs that post-process the output of dumpkeys. --funcs-only When this option is given, dumpkeys prints only the function key string definitions. Normally dumpkeys prints both the key bindings and the string definitions. --keys-only When this option is given, dumpkeys prints only the key bindings. Normally dumpkeys prints both the key bindings and the string def- initions. --compose-only When this option is given, dumpkeys prints only the compose key combinations. This option is available only if your kernel has com- pose key support. -ccharset --charset=charset This instructs dumpkeys to interpret character code values according to the specified character set. This affects only the transla- tion of character code values to symbolic names. Valid values for charset currently are iso-8859-X, Where X is a digit in 1-9. If no charset is specified, iso-8859-1 is used as a default. This option produces an output line `charset "iso-8859-X"', telling load- keys how to interpret the keymap. (For example, "division" is 0xf7 in iso-8859-1 but 0xba in iso-8859-8.) FILES
/usr/share/keymaps recommended directory for keytable files SEE ALSO
loadkeys(1), keymaps(5) 1 Sep 1993 DUMPKEYS(1)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy