Sponsored Content
Full Discussion: Football formation
Top Forums Shell Programming and Scripting Football formation Post 302922601 by Tzeronone on Monday 27th of October 2014 06:15:33 AM
Old 10-27-2014
Quote:
Originally Posted by Don Cragun
Maybe I'm lost because I'm used to American football, but I don't understand the rules that are being used to create the output you are expecting from your four given input files.

Why does this need to be done using perl? Is this a homework assignment?
For sure it is not homework assignment. From the formation.txt,
Code:
the first row: DR. Therefore, it will take the name from DR. txt which is ARBELOA 200
the second row: DC. Therefore, it will take the name from DC. txt which is RAMOS 200
the third row: DC. Therefore, it will take the name from DC. txt which is RAMOS 200, BUT since RAMOS is already exist in the line up, it will be filled by PEPE 190
the fourth row: DL. Therefore, it will take the name from DL. txt which is MARCELO 200
the fifth row: DR. Therefore, it will take the name from DR. txt which is ARBELOA 200, BUT since ARBELOA is already exist in the line up, it will be filled by CARVAJAL 190
the sixth row: DC. Therefore, it will take the name from DC. txt which is RAMOS 200, BUT since RAMOS and PEPE are already exist in the line up, it will be filled by VARANE 180
the seventh row: DC. Therefore, it will take the name from DC. txt which is RAMOS 200, BUT since RAMOS, PEPE and VARANE are already exist in the line up, it will be blank
the eighth row: DL. Therefore, it will take the name from DL. txt which is MARCELO 200, BUT since MARCELO is already exist in the line up, it will be filled by COENTRAO 190

Because I believe PERL is efficient for text processing and I have around 3312 of formation.

Last edited by Tzeronone; 10-27-2014 at 07:21 AM..
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

date command op formation

Dear All I am facing below mention problem plz suggest me solution. Op of date command: > date Tue Jan 1 12:17:52 IST 2008 Now i want Jan 1 12: or Jan 1 12 op in some another variable. I had tried awk but if give me problem when there is date comes in 2 digit i.e. greater that 9.... (1 Reply)
Discussion started by: jaydeep_sadaria
1 Replies

2. Shell Programming and Scripting

Formation of sql files

Dear Experts, I have a scenario where I have to form sql queries in a file using echo command. I have file1 which has more than 10 lac numbers. For each Number in file 1, I need to create 5 sql queries resulting in 50 lac queries totally. For doing this I use the below simple method, for i... (5 Replies)
Discussion started by: Naga06
5 Replies

3. Shell Programming and Scripting

Perl string formation from array

HI I ma using perl programming my perl is like this $InputFile = $ENV{UDE_TMP} . "/" ."cre_fmr_gen.temp_data_file_gen.dat"; @duplicates = `cat $InputFile | cut -d "|" -f 1,1 | sort | uniq -c | awk '{ if(\$1>1) {print \$2;}}'`; my $cusiplist ; foreach $cusip (@duplicates) {... (1 Reply)
Discussion started by: ptappeta
1 Replies

4. UNIX for Advanced & Expert Users

Data formation

I have a data like as follows, I need to format it as shown in as below. Request you to help me here ? I/P aa|3|1 aa|4|2 bb|3|1 bb|4|1 cc|3|26 cc|4|1 O/P aa|3|1|4|2 bb|3|1|4|1 cc|3|26|4|1 Thanks, Srikanth (5 Replies)
Discussion started by: srikanth38
5 Replies

5. Programming

Perl script to create football formation

I need help to create varieties of football formation. The available positions are: GK SW DR DC DL WBR DM WBL MR MC ML AMR AMC AML ST But the conditions are: a. the maximum number in 1 formation: GK is 1 SW is 1 (1 Reply)
Discussion started by: Tzeronone
1 Replies

6. Programming

Not a repeated question (Perl Script Create Football Formation)

https://www.unix.com/programming/252468-perl-script-create-football-formation.html https://www.unix.com/members/43551.html, it is not repeated question. please read it before u block my question. Unblock it for me. Thanks:mad: (0 Replies)
Discussion started by: Tzeronone
0 Replies
X2SYS_MERGE(1gmt)					       Generic Mapping Tools						 X2SYS_MERGE(1gmt)

NAME
x2sys_merge - Merge an updated COEs tables SYNOPSIS
x2sys_merge -Amain_COElist.d -Mnew_COElist.d DESCRIPTION
x2sys_merge will read two crossovers data base and output the contents of the main one updated with the COEs in the second one. The second file should only contain updated COEs relatively to the first one. That is, it MUST NOT contain any new two tracks intersections (This point is NOT checked in the code). This program is useful when, for any good reason like file editing NAV correction or whatever, one had to recompute only the COEs between the edited files and the rest of the database. -A Specify the file main_COElist.d with the main crossover error data base. -M Specify the file new_COElist.d with the newly computed crossover error data base. OPTIONS
No space between the option flag and the associated arguments. EXAMPLES To update the main COE_data.txt with the new COEs estimations saved in the smaller COE_fresh.txt, try x2sys_merge -ACOE_data.txt -MCOE_fresh.txt > COE_updated.txt SEE ALSO
x2sys_binlist(1), x2sys_cross(1), x2sys_datalist(1), x2sys_get(1), x2sys_init(1), x2sys_list(1), x2sys_put(1), x2sys_report(1) GMT 4.5.7 15 Jul 2011 X2SYS_MERGE(1gmt)
All times are GMT -4. The time now is 07:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy