Sponsored Content
Top Forums Shell Programming and Scripting Grouping multiple columns and concatenate Post 302866415 by Akshay Hegde on Tuesday 22nd of October 2013 01:50:46 AM
Old 10-22-2013
Sorry Jotne you told me before also to replace _ with some name as its difficult for new users to understand code, I am forgetting every time, I just modified #4 as you said.

Last edited by Akshay Hegde; 10-22-2013 at 03:02 AM..
This User Gave Thanks to Akshay Hegde For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find multiple patterns on multiple lines and concatenate output

I'm trying to parse COBOL code to combine variables into one string. I have two variable names that get literals moved into them and I'd like to use sed, awk, or similar to find these lines and combine the variables into the final component. These variable names are always VAR1 and VAR2. For... (8 Replies)
Discussion started by: wilg0005
8 Replies

2. Shell Programming and Scripting

concatenate 'n' number of columns in a file

i have a file which may have 'n' number of columns 1 222 fafda 32 afdaf 4343 4343 234 43fdaf 4343 fdd fdfd fdfd fdd fdfd fdfd fdfd fdfd fdfd fdd fdfd fdfd need to concatenate the columns with... (3 Replies)
Discussion started by: mlpathir
3 Replies

3. Shell Programming and Scripting

Concatenate columns from files

Hi, I have a file1.txt like this: and a file2.txt like this: I wat only append file2.txt to file1.txt and to have something like this: How could i do ? (2 Replies)
Discussion started by: AdminLew
2 Replies

4. Shell Programming and Scripting

Concatenate columns from multiple files

Hi all, I want the 2nd column of every file in the directory in a single file with the file name as column header. $cat file1.txt a b c d e f $cat file2.txt f g h g h j $cat file3.txt a b d f g h (2 Replies)
Discussion started by: newbie83
2 Replies

5. Shell Programming and Scripting

concatenate multiple file

Hi Need some help to concatenate files I have multiple spool files nearlly 15 of them which I need to concatenate like as shown in the below example for ex. file1.txt aaaa|bbbbb|cccc| dddd|eeee|ffff| kkkkk|uuuuu|gggg| file2.txt xxxx|yyyy|zzzz| 1111||kkkk|lllll... (2 Replies)
Discussion started by: rashmisb
2 Replies

6. Shell Programming and Scripting

regular expression grouping across multiple lines

cat book.txt book1 price 23 sku 1234 auth Bill book2 sku 1233 price 22 auth John book3 auth Frank price 24 book4 price 25 sku 129 auth Tod import re f = open('book.txt', 'r') text = f.read() f.close() m =... (2 Replies)
Discussion started by: chirish
2 Replies

7. UNIX for Dummies Questions & Answers

Concatenate two columns and separate by - (minus)

hi all could you please help me to concatenate two colomns and separate them by "-" the two colomns to concatenate are colomuns 1 and 3 of a very bif file clomn 1 is chr, 2 is snp and 3 is bp the new colomn is chr_B input file : 1 rs1111 10583 1 rs1891 10611 1 rs1807 ... (13 Replies)
Discussion started by: biopsy
13 Replies

8. Shell Programming and Scripting

How to concatenate 2-columns by 2 -columns for a text file?

Hello, I want to concatenate 2-columns by 2-columns separated by colon. How can I do so? For example, I have a text file containing 6 columns separated by tab. I want to concatenate column 1 and 2; column 3 and 4; column 5 and 6, respectively, and put a colon in between. input file: 1 0 0 1... (10 Replies)
Discussion started by: huiyee1
10 Replies

9. Shell Programming and Scripting

Concatenate two columns in a file

Hi i am having one requirement like to concatenate two columns in to one columns, can any one help on this please sample scenario i am placing below COL1,COL2,COL3,COL4 1,A,B,C,D 2,e,f,g,h ouput should be 3 columns like below. COL1,COL2,newcolumns 1,A,B,CD 2,e,f,gh ... (9 Replies)
Discussion started by: bhaskar v
9 Replies

10. Shell Programming and Scripting

How to grouping time and based on value with multiple pattern?

Hi All, need help... I have some log below : ### {"request_id":"e8395eb0-a8bd-11e9-b77b-d507ea5312aa","message":"when inquiry paybill 628524871 prevalidation cause : Invalid Transaction"} ### {"request_id":"043f2310-a8be-11e9-b57b-f9c7344998d7","message":"when inquiry paybill 62821615... (2 Replies)
Discussion started by: fajar_3t3
2 Replies
FAIRYMAX(6)						User Contributed Perl Documentation					       FAIRYMAX(6)

NAME
fairymax - xboard-compatible chess and chess-variant engine 'Fairy-Max' SYNOPSIS
fairymax [hashSize] [iniFile] shamax [hashSize] [iniFile] maxqi [hashSize] [iniFile] DESCRIPTION
fairymax is a program that plays chess and chess variants. It uses the xboard/winboard chess-engine protocol to communicate. Apart from 'regular' chess (also known as the Mad-Queen variant), it can play Capablanca chess, gothic chess, knightmate, cylinder chess, berolina chess, superchess, makruk (Thai chess), courier chess, Seirawan Chess, Spartan chess and chess with Different Armies. Fairy-Max can be easily configured by the user to play other variants as well, by modifying the ini file. This ini file describes the rules of movement of the participating pieces and the initial board setup. Fairy-Max can also play shatranj, but in this case is not aware of the shatranj rule that a bare king loses. So it might play sub- optimally in the late end-game. A version of Fairy-Max adapted to implement the baring rule is available under the name shamax. Similarly, a version of Fairy-Max adapted to play Xiang Qi (Chinese Chess) is included in the fairymax package as well, under the name maxqi. fairymax is a derivative of the world's (once) smallest chess program (source-code wise), micro-Max. The latter measures less that 2000 characters, (about 100 code lines), and has a computer rating of around 2050 on the CCRL rating list. Although this is about 1000 rating points behind the world champion, micro-Max still makes a quite tough opponent even for club players, although it is not unbeatable. The main difference between micro-Max and Fairy-Max is that the latter loads its move-generator tables, which specify how the various pieces move, from an external file, so it can be easily adapted to incorporate un-orthodox pieces. For ease of use of the artificial- intelligence, Fairy-Max is equipped with I/O routines that allow it to run with the xboard graphical user interface. See xboard(6) for instructions about how to use fairymax through xboard. To start up quickly, you just need the command: xboard -fcp fairymax. However, XBoard might not support symbols for every unorthodox piece in board sizes different from bulky, middling and petite. It might thus be advisable to specify a board size as well, e.g. xboard -fcp shamax -boardSize middling -variant shatranj to get correct display of the elephant and general pieces in shatranj. Note that to be able to play the chess variants, you will need xboard 4.3.14 or later. Some of the variants Fairy-Max plays are only partially supported by XBoard, and can only be played whith the legality-testing function of the latter switched off. (This applies to cylinder chess, berolina chess, great shatranj, Spartan chess and chess with different armies.) For some variants even the name is unknown to XBoard, and they are all grouped under the catchall name 'fairy'. Which variant is played by Fairy-Max when XBoard is set to 'fairy', can be determined by a combobox control in the XBoard 'Engine Settings' menu dialog. Fairymax supports multi-PV mode: by specifying a non-zero multi-PV margin in the Engine-Settings dialog of XBoard, Fairy-Max will not only print the principal variation for the best move, but also for every move that approaches the score of this best move to within the set margin. (If it does not find the best move on the first try, this might lead to printing of a few extra lines below the threshold.) The fmax.ini file from which Fairy-Max by default takes the piece and game definitions is a self-documenting text file, which contains instructions for how to define new pieces and chess variants. In addition it contains an extensive list of pre-defined pieces, incuding many not occurring in any of the pre-defined variants, which the user can draw on to define his own variants. Amongst the move types supported by Fairy-Max are normal leaper and slider moves, (e.g. knight and rook), divergent moves (i.e. capture and non-capture moves can be different) hoppers (which jump over other pieces, such as the Chinese cannon or the grasshopper), lame leapers (the move of which can be blocked on squares they cannot move to, such as the Chinese horse and elephant), and any combination thereof, in every possible direction. The board width is configurable upto a width of 14 squares, and cylindrical boards (where left and right edge connect) are supported as well. OPTIONS
hashSize If the first argument to fairymax is numeric, it is taken as an indicator for the amount of memory Fairy-Max is allowed to use for its internal hash table. The default value for this argument, 22, would result in a memory usage of 48MB. Each next-higher number doubles the memory usage, each next-lower halves it. Running with less than 6MB (i.e. argument 19) is not recommended. When fairymax is running under xboard 4.3.15 the hash-table size can be set through the xboard menus, making this argument superfluous. iniFile A second or non-numeric first argument is taken as a filename. Fairy-max will use the mentioned file in stead of its default fmax.ini file to define the movement of pieces and initial setup of the variants. This makes it easier to define your own variants. SEE ALSO
xboard(6) http://www.chessvariants.org/index/msdisplay.php?itemid=MSfairy-max http://home.hccnet.nl/h.g.muller/max-src2.html http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=50387 AUTHOR
Fairy-Max was written by H.G.Muller <h.g.muller@hccnet.nl>. This manual page was generated with pod2man(1). perl v5.10.1 2010-12-08 FAIRYMAX(6)
All times are GMT -4. The time now is 06:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy