Sponsored Content
Top Forums Programming "execution problem with perl" Post 302536799 by raghuraipur on Wednesday 6th of July 2011 09:17:18 AM
Old 07-06-2011
Bug "execution problem with perl"

hi everyone,

before stating my problem ,
i just want to say
thanks in advance for the time and trouble taken:-)

i am an newbie to perl programming,
the problem is a text file needed to be parsed,
i have looked over regular expressions and string matching but coudnt helped out..
the text file contained the format:-
Code:
A,1,B
A,2,B
A,1,C
C,1_1,A
B,2,D
B,1_1,A
B,2_2,A
B,2_2,D


after doing the required parser, the output must be in the following format shown below
Code:
A,1,B
B,1_1,A
A,2,B
B,2_2,A
A,1,C
C,1_1,A
B,2,D
D,2_2,D

can anyone let me know how to get the above required format?

thanks
raghuraipur

Last edited by Franklin52; 07-06-2011 at 10:44 AM.. Reason: Please use code tags for code and data samples, thank you
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies

3. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

4. Shell Programming and Scripting

"Execution problem". Getting error without sending e-mail

Hi, This is the end of the script. When i try to execute the script, i am getting the error. Please help me as to what is wrong with this script.? elif echo 'Load Failed -- Return Code =' $rc subject="Consent table load failed" ( echo "The log file is attached to... (1 Reply)
Discussion started by: msrahman
1 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Problem using "system" command in perl

Hello!!! I'm trying to pass the output from bash command to perl variable in a perl script, and I used the "system" command to execute the bash statment and pass the result to perl string variable, in this perl script I used a variable $file that store data for using it as a regular expression.... (2 Replies)
Discussion started by: evolabo
2 Replies

7. Shell Programming and Scripting

Problem of Perl's "join" function

$ perl -e '@f=("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","1","911"); print join("\t",@f)."\n";' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ... (5 Replies)
Discussion started by: carloszhang
5 Replies

8. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
DGR2FILE(1)							  DGR executables						       DGR2FILE(1)

NAME
dgr2file - DGR reception test program SYNOPSIS
dgr2file DESCRIPTION
dgr2file uses DGR to receive multiple copies of the text of a file transmitted by file2dgr, writing each copy of the file to the current working directory. The name of each file written by dgr2file is file_copy_cycleNbr, where cycleNbr is initially zero and is increased by 1 every time dgr2file closes the file it is currently writing and opens a new one. Upon receiving a DGR datagram from file2dgr, dgr2file extracts the content of the datagram (either a line of text from the file that is being transmitted by file2dgr or else an EOF string indicating the end of that file). It appends each extracted line of text to the local copy of that file that dgr2file is currently writing. When the extracted datagram content is an EOF string (the ASCII text "*** End of the file ***"), dgr2file closes the file it is writing, increments cycleNbr, opens a new copy of the file for writing, and prints the message "working on cycle cycleNbr." dgr2file always receives datagrams at port 2101. EXIT STATUS
0 dgr2file has terminated. FILES
No configuration files are needed. ENVIRONMENT
No environment variables apply. DIAGNOSTICS
can't open dgr service Operating system error. Check errtext, correct problem, and rerun. can't open output file Operating system error. Check errtext, correct problem, and rerun. dgr_receive failed Operating system error. Check errtext, correct problem, and rerun. can't write to output file Operating system error. Check errtext, correct problem, and rerun. BUGS
Report bugs to <ion-bugs@korgano.eecs.ohiou.edu> SEE ALSO
file2dgr(1), dgr(3) perl v5.14.2 2012-05-25 DGR2FILE(1)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy