Sponsored Content
Top Forums Shell Programming and Scripting Strip some text and format with new delimited Post 302929683 by RavinderSingh13 on Wednesday 24th of December 2014 08:44:35 AM
Old 12-24-2014
Thank you RudiC for pointing out same(Fan of you). Just edited a little to code to get the same output.
Code:
awk -F"; " '{gsub(/......$/,"00",$1);for(i=2;i<=NF;i++){gsub(/.* /,X,$i);gsub(/\;$/,Y,$i)}}1'  OFS=", " Input_file

Output will be as follows.
Code:
19:08:00, 74598, 1366, 227, 389, 572, 2228, 1039, 25
19:08:00, 75589, 1388, 233, 393, 582, 2253, 1055, 25
19:08:00, 76518, 1404, 238, 397, 592, 2270, 1069, 26
19:08:00, 77471, 1430, 239, 403, 602, 2312, 1083, 28

Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do I strip and add tabbed fields to a long text file?

I was wondering if there was a way to modify a tab delimited text file, up to 185,000 lines long by adding a repeated field to a block of 20 data , then repeat the process until the file is processed. The current file looks like: ... (3 Replies)
Discussion started by: saint65
3 Replies

2. Shell Programming and Scripting

how to strip rows from a text file?

Can an expert kindly write an efficient Linux ksh script that will strip rows with no numbers from a text file? Supposing there are three rows that text file called text.txt : "field1","field2","field3",11,22,33,44 "field1","field2","field3",1,2,3,4 "field1","field2","field3",,,, The... (5 Replies)
Discussion started by: ihot
5 Replies

3. Shell Programming and Scripting

Help needed to convert delimited to CSV format

I have a file with the data as follows.. FILE 1|#START|Jan 22 15:03 FILE 1|#END|Jan 22 16:06 FILE 2|#START|Jan 22 5:15 FILE 2|#END|Jan 22 5:25 FILE 3|#START|Jan 22 07:03 FILE 3|#END|Jan 22 08:15 FILE 4|#START|Jan 22 16:09 FILE 4|#END|Jan 22 16:55 FILE 1|#START|Jan 22 18:15 FILE... (5 Replies)
Discussion started by: karthikd214
5 Replies

4. Shell Programming and Scripting

how to convert this file into comma delimited format

Hi experts, I need urget help! I have the a text file with this format: Types of fruits Name of fruits 1,1 Farm_no,1 apple,1 pineapple,1 grapes,1 orange,1 banana,1 2,2--->this is the record seperator Farm_no,2 apple,1 pineapple,1 grapes,3 orange,2 banana,1 3,3--->this is the... (1 Reply)
Discussion started by: natalie23
1 Replies

5. UNIX for Dummies Questions & Answers

How to convert text to columns in tab delimited text file

Hello Gurus, I have a text file containing nearly 12,000 tab delimited characters with 4000 rows. If the file size is small, excel can convert the text into coloumns. However, the file that I have is very big. Can some body help me in solving this problem? The input file example, ... (6 Replies)
Discussion started by: Unilearn
6 Replies

6. UNIX for Dummies Questions & Answers

How to convert a text file into tab delimited format?

I have a text file that made using text editor in Ubuntu. However the text file is not being recognized as space or tab delimited, the formatting seems to be messed up. How can I convert the text file into tab delimited format? (3 Replies)
Discussion started by: evelibertine
3 Replies

7. Shell Programming and Scripting

Append output in tab delimited format

hello.. i m scripting in Perl and having issue writing the output in specific format..i read two files and run some commands and write output to one file. i want this to be a 2d table, File one has 48 rows and file two has 48 rows, first i take one id from file one, and go to second file, loop... (2 Replies)
Discussion started by: empyrean
2 Replies

8. UNIX for Dummies Questions & Answers

Need to convert a pipe delimited text file to tab delimited

Hi, I have a rquirement in unix as below . I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column. ex: Input Text file: 1|A|apple 2|B|bottle excel file to be generated as output as... (9 Replies)
Discussion started by: raja kakitapall
9 Replies

9. Shell Programming and Scripting

Get the output of w command in pipe delimited format

Since output of w command have variable number of columns I want to get the output in pipe delimited format. I tried export OFS="|"; w but that does not work. Any ideas? (4 Replies)
Discussion started by: Soham
4 Replies
DateTime::Locale::kfo(3)				User Contributed Perl Documentation				  DateTime::Locale::kfo(3)

NAME
DateTime::Locale::kfo SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'kfo' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Koro. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) Je-Kubacha Je-Gbai Tansati Je-Yei Je-Koye Sati Lahadi Abbreviated (format) Kub Gba Tan Yei Koy Sat Lah Narrow (format) 2 3 4 5 6 7 1 Wide (stand-alone) Je-Kubacha Je-Gbai Tansati Je-Yei Je-Koye Sati Lahadi Abbreviated (stand-alone) Kub Gba Tan Yei Koy Sat Lah Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) Fai Weyene Fai Fani Fai Tataka Fai Nangra Fai Tuyo Fai Tsoyi Fai Tafaka Fai Warachi Fai Kunobok Fai Bansok Fai Kom Fai Sauk Abbreviated (format) Wey Fan Tat Nan Tuy Tso Taf War Kun Ban Kom Sau Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) Fai Weyene Fai Fani Fai Tataka Fai Nangra Fai Tuyo Fai Tsoyi Fai Tafaka Fai Warachi Fai Kunobok Fai Bansok Fai Kom Fai Sauk Abbreviated (stand-alone) Wey Fan Tat Nan Tuy Tso Taf War Kun Ban Kom Sau Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide Kafi Mar Wenom Bayan Chi Wenom Abbreviated KMW BCW Narrow KMW BCW Date Formats Full 2008-02-05T18:30:30 = Je-Gbai, 2008 Fai Fani 05 1995-12-22T09:05:02 = Je-Koye, 1995 Fai Sauk 22 -0010-09-15T04:44:23 = Sati, -10 Fai Kunobok 15 Long 2008-02-05T18:30:30 = 2008 Fai Fani 5 1995-12-22T09:05:02 = 1995 Fai Sauk 22 -0010-09-15T04:44:23 = -10 Fai Kunobok 15 Medium 2008-02-05T18:30:30 = 2008 Fan 5 1995-12-22T09:05:02 = 1995 Sau 22 -0010-09-15T04:44:23 = -10 Kun 15 Short 2008-02-05T18:30:30 = 08/02/05 1995-12-22T09:05:02 = 95/12/22 -0010-09-15T04:44:23 = -10/09/15 Default 2008-02-05T18:30:30 = 2008 Fan 5 1995-12-22T09:05:02 = 1995 Sau 22 -0010-09-15T04:44:23 = -10 Kun 15 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = Je-Gbai, 2008 Fai Fani 05 18:30:30 UTC 1995-12-22T09:05:02 = Je-Koye, 1995 Fai Sauk 22 09:05:02 UTC -0010-09-15T04:44:23 = Sati, -10 Fai Kunobok 15 04:44:23 UTC Long 2008-02-05T18:30:30 = 2008 Fai Fani 5 18:30:30 UTC 1995-12-22T09:05:02 = 1995 Fai Sauk 22 09:05:02 UTC -0010-09-15T04:44:23 = -10 Fai Kunobok 15 04:44:23 UTC Medium 2008-02-05T18:30:30 = 2008 Fan 5 18:30:30 1995-12-22T09:05:02 = 1995 Sau 22 09:05:02 -0010-09-15T04:44:23 = -10 Kun 15 04:44:23 Short 2008-02-05T18:30:30 = 08/02/05 18:30 1995-12-22T09:05:02 = 95/12/22 09:05 -0010-09-15T04:44:23 = -10/09/15 04:44 Default 2008-02-05T18:30:30 = 2008 Fan 5 18:30:30 1995-12-22T09:05:02 = 1995 Sau 22 09:05:02 -0010-09-15T04:44:23 = -10 Kun 15 04:44:23 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 Gba 1995-12-22T09:05:02 = 22 Koy -0010-09-15T04:44:23 = 15 Sat 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 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM 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 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM 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 = Gba, 2-5 1995-12-22T09:05:02 = Koy, 12-22 -0010-09-15T04:44:23 = Sat, 9-15 MMM (LLL) 2008-02-05T18:30:30 = Fan 1995-12-22T09:05:02 = Sau -0010-09-15T04:44:23 = Kun MMMd (MMM d) 2008-02-05T18:30:30 = Fan 5 1995-12-22T09:05:02 = Sau 22 -0010-09-15T04:44:23 = Kun 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Gba Fan 5 1995-12-22T09:05:02 = Koy Sau 22 -0010-09-15T04:44:23 = Sat Kun 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = Fai Fani 5 1995-12-22T09:05:02 = Fai Sauk 22 -0010-09-15T04:44:23 = Fai Kunobok 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Gba Fai Fani 5 1995-12-22T09:05:02 = Koy Fai Sauk 22 -0010-09-15T04:44:23 = Sat Fai Kunobok 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 = Gba, 2008-2-5 1995-12-22T09:05:02 = Koy, 1995-12-22 -0010-09-15T04:44:23 = Sat, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Fan 1995-12-22T09:05:02 = 1995 Sau -0010-09-15T04:44:23 = -10 Kun yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Gba, 2008 Fan 5 1995-12-22T09:05:02 = Koy, 1995 Sau 22 -0010-09-15T04:44:23 = Sat, -10 Kun 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Fai Fani 1995-12-22T09:05:02 = 1995 Fai Sauk -0010-09-15T04:44:23 = -10 Fai Kunobok 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 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week Je-Kubacha 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.16.3 2014-06-10 DateTime::Locale::kfo(3)
All times are GMT -4. The time now is 07:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy