Sponsored Content
Full Discussion: Column wise file parsing.
Top Forums Shell Programming and Scripting Column wise file parsing. Post 302282117 by navojit dutta on Friday 30th of January 2009 06:58:04 AM
Old 01-30-2009
Column wise file parsing.

Shell script for the below operation :

File "A" contains :

SEQ++1'
MOA+9:000,00:ABC'
RFF+AIK:000000007'
FII+PH+0170++AA'
NAD+PL+++XXXXXXXXXXX XXXXXXX XX++XXX XXXX XXXX X.X. XXXXXXXXX+++NL'
SEQ++2'
MOA+9:389,47:ABC'
RFF+AIK:02110300000008'
FII+PH+0PSTBNL2A:25:5+BB'
NAD+PL+++************************++********************+++NL'
SEQ++3'
MOA+9:3086,55SmilieDD'
RFF+AIK:00009'
FII+PH+0348932928++GG'
NAD+PL+++XXX++XXX XXXX XXXX X.X. XXXXXXXXX+++NL'

Need to fetch the details from the above file "A" and put them in file "B" in the below format :

payment file | Amount | Ref | Account No

1 9:000,00:ABC' 000000007' 0170++AA
2 9:389,47:ABC' 02110300000008' 0PSTBNL2A:25:5+BB'

The columns can be tab delimited.
I was able to do it in step wise using sed...have anyone done this in this way?

Thanks....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

processing matrix column wise

I have a m X n matrix written out to file, say like this: 1,2,3,4,5,6 2,6,3,10,34,67 1,45,6,7,8,8 I want to calculate the column averages in the MINIMUM amount of code or processing possible. I would have liked to use my favorite tool, "AWK" but since it processes rowwise, getting the... (5 Replies)
Discussion started by: Abhishek Ghose
5 Replies

2. Shell Programming and Scripting

o/p column wise by nawk

hi i have file which hav following entries 1501,AAA,2.00 1525,AAA,2.00 1501,AAA,2.00 1525,AAA,2.00 1501,AAA,3.00 1525,AAA,3.00 1525,AAA,3.00 1501,AAA,3.00 1501,AAA,3.00 i want to have a o/p coloum wise like 1501,AAA,13 1525,AAA,10 here 13 comes as a sum of last colum value... (6 Replies)
Discussion started by: aaysa123
6 Replies

3. Solaris

column wise substitution in a file

Hi, I have two files. Want to make an addition of the fifth column of from both the files and redirect it to a third file. Both files have same records except fifth field and same record should be inserted into new file having fifth field as addition of fifth fields of both files. for... (2 Replies)
Discussion started by: sanjay1979
2 Replies

4. Shell Programming and Scripting

Search a file column wise and delete it

i have a file which has a column that is unique i am intending to serach it and if it is there to remove the row. the file looks like ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT 15 ,rig ,34 ,56 ,87 ,177 ,59 % ,PASS 23 ,wel ,45 ,76 ,56 ,177 ,59 % ... (0 Replies)
Discussion started by: gotam
0 Replies

5. Shell Programming and Scripting

Search a file column wise and delete it

Scottn, m really sorry but i have not got my answer yet. my concern is how to delete the row !!! i have a file which has a column that is unique i am intending to serach it and if it is there to remove the row. the file looks like ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT... (9 Replies)
Discussion started by: gotam
9 Replies

6. Shell Programming and Scripting

read file line by line print column wise

I have a .csv file which is seperated with (;) inputfile --------- ZZZZ;AAAA;BBB;CCCC;DDD;EEE; YYYY;BBBB;CCC;DDDD;EEE;FFF; ... ... reading file line by line till end of file. while reading each line output format should be . i need to print only specific columns let say 5th... (2 Replies)
Discussion started by: rocking77
2 Replies

7. Shell Programming and Scripting

Adding content of two file in a single file column wise

Hi, I am trying to get the file in particular pattern using shell script. I have to add one column to some other file. For example consider two file as below. File1: name1 name2 name3 File2: Add1 age1 Add2 age2 Add3 age3 I want this two file in a single file format something like... (3 Replies)
Discussion started by: diehard
3 Replies

8. Red Hat

How to find a garbage entry in a column wise text file in Linux?

Suppose I have a file containing :- 1 Apple $50 2 Orange $30 3 Banana $10 4 Guava $25 5 Pine@apple $12 6 Strawberry $21 7 Grapes $12 In the 5th row, @ character inserted. I want through sort command or by any other way this row should either on top or bottom. By sort command garbage... (1 Reply)
Discussion started by: Dipankar Mitra
1 Replies

9. Shell Programming and Scripting

Column wise text adding

Hi I have pasted sample data as below:- in data.txt Please suggest any way out: as the 3rd field is cat data.txt 22:37:34 STARTING abc 22:37:40 FAILURE sadn 00:06:42 STARTING asd 00:06:51 FAILURE ad 02:06:38 STARTING acs 02:06:46 FAILURE cz 04:06:35 STARTING xzc... (1 Reply)
Discussion started by: Gaurav198
1 Replies

10. Shell Programming and Scripting

Proper Column wise matching

My below code works fine if none of the columns has pipe as its content in it, If it has the pipe in any of the content then the value moves to the next column. I wanted my code to work fine even if the column has pipe in it apart from the delimiter. NOTE : If there is a pipe in the content... (6 Replies)
Discussion started by: nikhil jain
6 Replies
DateTime::Locale::si_LK(3)				User Contributed Perl Documentation				DateTime::Locale::si_LK(3)

NAME
DateTime::Locale::si_LK SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'si_LK' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Sinhala Sri Lanka. DATA
This locale inherits from the DateTime::Locale::si locale. It contains the following data. Days Wide (format) XXXXX XXXXXXXXX XXXXX XXXXXXXXXXXXXX XXXXXXXX XXXXXXXXX XXXXX Abbreviated (format) XXX XX XXX XXXXX XXXX XXX XXX Narrow (format) X X X XXXX XX XX X Wide (stand-alone) XXXXX XXXXXXXXX XXXXX XXXXXXXXXXXXXX XXXXXXXX XXXXXXXXX XXXXX Abbreviated (stand-alone) XXX XX XXX XXXXX XXXX XXX XXX Narrow (stand-alone) X X X XXXX XX XX X Months Wide (format) XXXXX XXXXXXX XXXXX XXXXXXXX XXXX XXX XXXX XXXXXXX XXXXXXXXXXX XXXXXXXX XXXXXXXXX XXXXXXXXX Abbreviated (format) XX XXX XXXXX XXXXXXX XXX XXX XXX XXX XXX XX XXXX XXXX Narrow (format) X XX XX X XX XX XX X XX X XX XX Wide (stand-alone) XXXXX XXXXXXX XXXXX XXXXXXXX XXXX XXX XXXX XXXXXXX XXXXXXXXXXX XXXXXXXX XXXXXXXXX XXXXXXXXX Abbreviated (stand-alone) XX XXX XXXXX XXXXXXX XXX XXX XXX XXX XXX XX XXXX XXXX Narrow (stand-alone) X XX XX X XX XX XX X XX X XX XX Quarters Wide (format) 1 XX XXXXXXX 2 XX XXXXXXX 3 XX XXXXXXX 4 XX XXXXXXX Abbreviated (format) XXXX:1 XXXX:2 XXXX:3 XXXX:4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1 XX XXXXXXX 2 XX XXXXXXX 3 XX XXXXXXX 4 XX XXXXXXX Abbreviated (stand-alone) XXXX:1 XXXX:2 XXXX:3 XXXX:4 Narrow (stand-alone) 1 2 3 4 Eras Wide XXXXXXXXX XXXXXX XXXXXXXXX XXXXX Abbreviated XXXXX.XX. XXXXX.X. Narrow XXXXX.XX. XXXXX.X. Date Formats Full 2008-02-05T18:30:30 = XXXXXXXXX, 2008 XXXXXXX 5 1995-12-22T09:05:02 = XXXXXXXX, 1995 XXXXXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXXX, -10 XXXXXXXXXXX 15 Long 2008-02-05T18:30:30 = 2008 XXXXXXX 5 1995-12-22T09:05:02 = 1995 XXXXXXXXX 22 -0010-09-15T04:44:23 = -10 XXXXXXXXXXX 15 Medium 2008-02-05T18:30:30 = 2008 XXX 5 1995-12-22T09:05:02 = 1995 XXXX 22 -0010-09-15T04:44:23 = -10 XXX 15 Short 2008-02-05T18:30:30 = 2008/02/05 1995-12-22T09:05:02 = 1995/12/22 -0010-09-15T04:44:23 = -010/09/15 Default 2008-02-05T18:30:30 = 2008 XXX 5 1995-12-22T09:05:02 = 1995 XXXX 22 -0010-09-15T04:44:23 = -10 XXX 15 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 X.X. UTC 1995-12-22T09:05:02 = 9:05:02 XX.X. UTC -0010-09-15T04:44:23 = 4:44:23 XX.X. UTC Long 2008-02-05T18:30:30 = 6:30:30 X.X. UTC 1995-12-22T09:05:02 = 9:05:02 XX.X. UTC -0010-09-15T04:44:23 = 4:44:23 XX.X. UTC Medium 2008-02-05T18:30:30 = 6:30:30 X.X. 1995-12-22T09:05:02 = 9:05:02 XX.X. -0010-09-15T04:44:23 = 4:44:23 XX.X. Short 2008-02-05T18:30:30 = 6:30 X.X. 1995-12-22T09:05:02 = 9:05 XX.X. -0010-09-15T04:44:23 = 4:44 XX.X. Default 2008-02-05T18:30:30 = 6:30:30 X.X. 1995-12-22T09:05:02 = 9:05:02 XX.X. -0010-09-15T04:44:23 = 4:44:23 XX.X. Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXXX, 2008 XXXXXXX 5 6:30:30 X.X. UTC 1995-12-22T09:05:02 = XXXXXXXX, 1995 XXXXXXXXX 22 9:05:02 XX.X. UTC -0010-09-15T04:44:23 = XXXXXXXXX, -10 XXXXXXXXXXX 15 4:44:23 XX.X. UTC Long 2008-02-05T18:30:30 = 2008 XXXXXXX 5 6:30:30 X.X. UTC 1995-12-22T09:05:02 = 1995 XXXXXXXXX 22 9:05:02 XX.X. UTC -0010-09-15T04:44:23 = -10 XXXXXXXXXXX 15 4:44:23 XX.X. UTC Medium 2008-02-05T18:30:30 = 2008 XXX 5 6:30:30 X.X. 1995-12-22T09:05:02 = 1995 XXXX 22 9:05:02 XX.X. -0010-09-15T04:44:23 = -10 XXX 15 4:44:23 XX.X. Short 2008-02-05T18:30:30 = 2008/02/05 6:30 X.X. 1995-12-22T09:05:02 = 1995/12/22 9:05 XX.X. -0010-09-15T04:44:23 = -010/09/15 4:44 XX.X. Default 2008-02-05T18:30:30 = 2008 XXX 5 6:30:30 X.X. 1995-12-22T09:05:02 = 1995 XXXX 22 9:05:02 XX.X. -0010-09-15T04:44:23 = -10 XXX 15 4:44:23 XX.X. Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XX 1995-12-22T09:05:02 = 22 XXXX -0010-09-15T04:44:23 = 15 XXX Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 X.X. 1995-12-22T09:05:02 = 9:05 XX.X. -0010-09-15T04:44:23 = 4:44 XX.X. Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 X.X. 1995-12-22T09:05:02 = 9:05:02 XX.X. -0010-09-15T04:44:23 = 4:44:23 XX.X. M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = XX, 2-5 1995-12-22T09:05:02 = XXXX, 12-22 -0010-09-15T04:44:23 = XXX, 9-15 MMM (LLL) 2008-02-05T18:30:30 = XXX 1995-12-22T09:05:02 = XXXX -0010-09-15T04:44:23 = XXX MMMd (MMM d) 2008-02-05T18:30:30 = XXX 5 1995-12-22T09:05:02 = XXXX 22 -0010-09-15T04:44:23 = XXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XX XXX 5 1995-12-22T09:05:02 = XXXX XXXX 22 -0010-09-15T04:44:23 = XXX XXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXXXXXX 5 1995-12-22T09:05:02 = XXXXXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXXXXX 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XX XXXXXXX 5 1995-12-22T09:05:02 = XXXX XXXXXXXXX 22 -0010-09-15T04:44:23 = XXX XXXXXXXXXXX 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = XX, 2008-2-5 1995-12-22T09:05:02 = XXXX, 1995-12-22 -0010-09-15T04:44:23 = XXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXX 1995-12-22T09:05:02 = 1995 XXXX -0010-09-15T04:44:23 = -10 XXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XX, 2008 XXX 5 1995-12-22T09:05:02 = XXXX, 1995 XXXX 22 -0010-09-15T04:44:23 = XXX, -10 XXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXXXX 1995-12-22T09:05:02 = 1995 XXXXXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXXXXX yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 XXXX:1 1995-12-22T09:05:02 = 1995 XXXX:4 -0010-09-15T04:44:23 = -10 XXXX:3 Miscellaneous Prefers 24 hour time? No Local first day of the week XXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::si_LK(3)
All times are GMT -4. The time now is 07:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy