Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Inserting commas and replacing backslashes with commas Post 302256945 by fpmurphy on Tuesday 11th of November 2008 12:34:09 AM
Old 11-11-2008
Code:
sed 's/\(.\{11\}\)\( \)\(.*\)\( \/ \)\(.*\)\( \/ \)\(.*\)/\1,\3,\5,\7/' file

Code:
Jul 20 2008,1111,visit home,BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLOC-1.1 VendorID/105
Jul 21 2008,22222,add friend,BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLOC-1.1 VendorID/105
Jul 22 2008,333,view profile,Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing commas with tilde in csv file.

hello all, i have a comma delimited file. i want to replace the commas in the file with the tilde symbol using sed. how can i do this? thanks. (4 Replies)
Discussion started by: femig
4 Replies

2. Shell Programming and Scripting

Need help in removing commas

i have the below line as output from a script. I want to delete the string "," and get the output without comma, cat D* | grep "bytes free" | awk '{print $3}' | ????? output: 40,966,189,056 Desired O/P: 40966189056 (1 Reply)
Discussion started by: ali560045
1 Replies

3. Shell Programming and Scripting

Replacing 3 backslashes with 2 in a string

Hi, I have a requirement where i need to replace 3 backslashes with 2 in the below mentioned string, but i am facing problem with backslashes. However i tried the option below but doesnt work. My input remains a constant as i receive it from my upstream. Input String= "-rfile... (3 Replies)
Discussion started by: kk_madrid
3 Replies

4. Shell Programming and Scripting

Help with sed and replacing white spaces with commas

Dear all, I am in a bit of a quandary. I have 400 text files which I need to edit and output in a very specific way. Here is a sample text file copied from gedit ... The columns will come out a bit messed up but when I cat <file>, it gives a table with six columns (0-28, tot lob vol, vcsf,... (6 Replies)
Discussion started by: antonz
6 Replies

5. Shell Programming and Scripting

Commas within Delimeters

Hi experts, I would like a favour from you guys to get the info from 5th column which was separated by the delimeter comma ( , ) The Data file is as below:- 1,USER1,"90, TEST AVENUE, OLD ROAD",test1,124,N 2,USER2,88 TEST STREET NEW ROAD,test2,123,N The User File is as below:- USER1... (1 Reply)
Discussion started by: shenkz
1 Replies

6. Shell Programming and Scripting

Inserting commas into file at set locations...

Hey everyone. What would be the best method to insert commas (or comma-quotes) into a file at set locations. Every line in the file looks like this: 1234567890123456 123456BIGAUDIODYNAMITE33 123.12 123456 12345678901234MARK E WILLIAMS 123456 The comma's should... (6 Replies)
Discussion started by: Astrocloud
6 Replies

7. Shell Programming and Scripting

Replace field with commas with field without commas

Hey guys, I have the following text: 1,2,3,4,5,6,'NULL','when',NULL,1,2,0,'NULL' 1,2,3,4,5,6,'NULL','what','NULL',1,2,0,1 I need the same text with the word NULL without commas u know something like this: 1,2,3,4,5,6,NULL,'when',NULL,1,2,0,NULL 1,2,3,4,5,6,NULL,'what','NULL',1,2,0,1 ... (1 Reply)
Discussion started by: lmyk72
1 Replies

8. Shell Programming and Scripting

Removing just the trailing commas :-(

Hi all, I haven't needed to do any shell based editing for nearly 20 years, and no amount of searching around has found me a solution to this very simple problem :-( I have a csv file. Some lines have three commas at the end. This means the invoice hasn't been paid. I'd like to use sed / grep... (4 Replies)
Discussion started by: chardyzulu
4 Replies

9. Shell Programming and Scripting

Merging multiple lines to columns with awk, while inserting commas for missing lines

Hello all, I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person. In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies

10. UNIX for Beginners Questions & Answers

Insert commas

Original content: ACACCTCAT 129 | ACACCTCAT 0 ACACCTCATX 171 | ACACCTCATX 0 ACACRESRT 0 ACACRESRT 0 ACACRESRTX 0 ... (4 Replies)
Discussion started by: loktamann
4 Replies
DateTime::Locale::gl(3) 				User Contributed Perl Documentation				   DateTime::Locale::gl(3)

NAME
DateTime::Locale::gl SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'gl' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Galician. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) Luns Martes Mercores Xoves Venres Sabado Domingo Abbreviated (format) Lun Mar Mer Xov Ven Sab Dom Narrow (format) L M M X V S D Wide (stand-alone) Luns Martes Mercores Xoves Venres Sabado Domingo Abbreviated (stand-alone) Lun Mar Mer Xov Ven Sab Dom Narrow (stand-alone) L M M X V S D Months Wide (format) Xaneiro Febreiro Marzo Abril Maio Xun~o Xullo Agosto Setembro Outubro Novembro Decembro Abbreviated (format) Xan Feb Mar Abr Mai Xun~ Xul Ago Set Out Nov Dec Narrow (format) X F M A M X X A S O N D Wide (stand-alone) Xaneiro Febreiro Marzo Abril Maio Xun~o Xullo Agosto Setembro Outubro Novembro Decembro Abbreviated (stand-alone) Xan Feb Mar Abr Mai Xun~ Xul Ago Set Out Nov Dec Narrow (stand-alone) X F M A M X X A S O N D Quarters Wide (format) 1o trimestre 2o trimestre 3o trimestre 4o trimestre Abbreviated (format) T1 T2 T3 T4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1o trimestre 2o trimestre 3o trimestre 4o trimestre Abbreviated (stand-alone) T1 T2 T3 T4 Narrow (stand-alone) 1 2 3 4 Eras Wide antes de Cristo despois de Cristo Abbreviated a.C. d.C. Narrow a.C. d.C. Date Formats Full 2008-02-05T18:30:30 = Martes 05 Febreiro 2008 1995-12-22T09:05:02 = Venres 22 Decembro 1995 -0010-09-15T04:44:23 = Sabado 15 Setembro -10 Long 2008-02-05T18:30:30 = 05 Febreiro 2008 1995-12-22T09:05:02 = 22 Decembro 1995 -0010-09-15T04:44:23 = 15 Setembro -10 Medium 2008-02-05T18:30:30 = 5 Feb, 2008 1995-12-22T09:05:02 = 22 Dec, 1995 -0010-09-15T04:44:23 = 15 Set, -10 Short 2008-02-05T18:30:30 = 05/02/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/09/-10 Default 2008-02-05T18:30:30 = 5 Feb, 2008 1995-12-22T09:05:02 = 22 Dec, 1995 -0010-09-15T04:44:23 = 15 Set, -10 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 = Martes 05 Febreiro 2008 18:30:30 UTC 1995-12-22T09:05:02 = Venres 22 Decembro 1995 09:05:02 UTC -0010-09-15T04:44:23 = Sabado 15 Setembro -10 04:44:23 UTC Long 2008-02-05T18:30:30 = 05 Febreiro 2008 18:30:30 UTC 1995-12-22T09:05:02 = 22 Decembro 1995 09:05:02 UTC -0010-09-15T04:44:23 = 15 Setembro -10 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 Feb, 2008 18:30:30 1995-12-22T09:05:02 = 22 Dec, 1995 09:05:02 -0010-09-15T04:44:23 = 15 Set, -10 04:44:23 Short 2008-02-05T18:30:30 = 05/02/08 18:30 1995-12-22T09:05:02 = 22/12/95 09:05 -0010-09-15T04:44:23 = 15/09/-10 04:44 Default 2008-02-05T18:30:30 = 5 Feb, 2008 18:30:30 1995-12-22T09:05:02 = 22 Dec, 1995 09:05:02 -0010-09-15T04:44:23 = 15 Set, -10 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 Mar 1995-12-22T09:05:02 = 22 Ven -0010-09-15T04:44:23 = 15 Sab Hm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04: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 (d-M) 2008-02-05T18:30:30 = 5-2 1995-12-22T09:05:02 = 22-12 -0010-09-15T04:44:23 = 15-9 MEd (E, d-M) 2008-02-05T18:30:30 = Mar, 5-2 1995-12-22T09:05:02 = Ven, 22-12 -0010-09-15T04:44:23 = Sab, 15-9 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 MMM (LLL) 2008-02-05T18:30:30 = Feb 1995-12-22T09:05:02 = Dec -0010-09-15T04:44:23 = Set MMMd (d MMM) 2008-02-05T18:30:30 = 5 Feb 1995-12-22T09:05:02 = 22 Dec -0010-09-15T04:44:23 = 15 Set MMMEd (E d MMM) 2008-02-05T18:30:30 = Mar 5 Feb 1995-12-22T09:05:02 = Ven 22 Dec -0010-09-15T04:44:23 = Sab 15 Set MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 Febreiro 1995-12-22T09:05:02 = 22 Decembro -0010-09-15T04:44:23 = 15 Setembro MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 Febreiro 1995-12-22T09:05:02 = 22 Decembro -0010-09-15T04:44:23 = 15 Setembro MMMMEd (E d MMMM) 2008-02-05T18:30:30 = Mar 5 Febreiro 1995-12-22T09:05:02 = Ven 22 Decembro -0010-09-15T04:44:23 = Sab 15 Setembro 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 (M-yyyy) 2008-02-05T18:30:30 = 2-2008 1995-12-22T09:05:02 = 12-1995 -0010-09-15T04:44:23 = 9--010 yMEd (EEE, d-M-yyyy) 2008-02-05T18:30:30 = Mar, 5-2-2008 1995-12-22T09:05:02 = Ven, 22-12-1995 -0010-09-15T04:44:23 = Sab, 15-9--010 yMMM (MMM y) 2008-02-05T18:30:30 = Feb 2008 1995-12-22T09:05:02 = Dec 1995 -0010-09-15T04:44:23 = Set -10 yMMMEd (EEE, d MMM y) 2008-02-05T18:30:30 = Mar, 5 Feb 2008 1995-12-22T09:05:02 = Ven, 22 Dec 1995 -0010-09-15T04:44:23 = Sab, 15 Set -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = Febreiro 2008 1995-12-22T09:05:02 = Decembro 1995 -0010-09-15T04:44:23 = Setembro -10 yQ (Q yyyy) 2008-02-05T18:30:30 = 1 2008 1995-12-22T09:05:02 = 4 1995 -0010-09-15T04:44:23 = 3 -010 yQQQ (QQQ y) 2008-02-05T18:30:30 = T1 2008 1995-12-22T09:05:02 = T4 1995 -0010-09-15T04:44:23 = T3 -10 yyMM (MM/yy) 2008-02-05T18:30:30 = 02/08 1995-12-22T09:05:02 = 12/95 -0010-09-15T04:44:23 = 09/-10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = Febreiro 2008 1995-12-22T09:05:02 = Decembro 1995 -0010-09-15T04:44:23 = Setembro -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week Luns 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.2 2013-08-25 DateTime::Locale::gl(3)
All times are GMT -4. The time now is 08:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy