Sponsored Content
Top Forums UNIX for Advanced & Expert Users Match the string and copy records to another location Post 302277336 by bsandeep_80 on Friday 16th of January 2009 03:15:01 AM
Old 01-16-2009
Match the string and copy records to another location

Hi,

I have particular set of files which have the below contents:

****** PBX TYPE:ID6 PBX-id: A11 rolled on 123456 368763 00 >>>>>>
A11,2008-07-01 21:31:00.000,42,42112, ,XXXXXXXX
A11,2008-07-01 21:40:00.000,6, , ,XXXXXXX
A12,2008-07-01 21:53:00.000,68, , ,XXXXXXXX
A13,2008-07-01 21:55:00.000,8,XXXX, ,XXXXX
A11,2008-07-01 21:55:00.000,26, , ,XXXXX
A11,2008-07-01 21:55:00.000,26,XXXXX
****** PBX TYPE:GG3 PBX-id: A44 rolled on 011409 163401 00 >>>>>>
0237953 1234567890 T000018
0237953 1234567899 T000011
0236545 1234567870 T000023


I would want to copy the records starting with header as ****** PBX TYPE:ID6 to another location.

like :

****** PBX TYPE:ID6 PBX-id: A11 rolled on 123456 368763 00 >>>>>>
A11,2008-07-01 21:31:00.000,42,42112, ,XXXXXXXX
A11,2008-07-01 21:40:00.000,6, , ,XXXXXXX
A12,2008-07-01 21:53:00.000,68, , ,XXXXXXXX
A13,2008-07-01 21:55:00.000,8,XXXX, ,XXXXX
A11,2008-07-01 21:55:00.000,26, , ,XXXXX
A11,2008-07-01 21:55:00.000,26,XXXXX


How can i do that.

Thanks,
Sandeep
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

copy files from one location to similar location

I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure, say location 1, /home/rick/tmp_files/1-12/00-25/ here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Discussion started by: pharos467
1 Replies

2. UNIX for Dummies Questions & Answers

Copy directory from one location to other

Hi All, I am newbie for Unix. I want to copy a directory from one location to other. Can any one help me by providing the command to do following task. thanks in advance, Rakesh (2 Replies)
Discussion started by: rakeshvthu
2 Replies

3. Shell Programming and Scripting

Put one string from one location to another location in a file

Hi Everyone, I have 1.txt here a b c' funny"yes"; d e The finally output is: here a b c d e' funny"yes"; (1 Reply)
Discussion started by: jimmy_y
1 Replies

4. Shell Programming and Scripting

Shell Script for Copy files from one location to another location

Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies

5. Shell Programming and Scripting

How to copy a file from one location to another location?

I have file file1.txt in location 'loc1'. Now i want a copy of this file in location 'loc2' with a new file called test.txt. Please help me how to do this in shell script. (1 Reply)
Discussion started by: vel4ever
1 Replies

6. Shell Programming and Scripting

Deleting duplicate records from file 1 if records from file 2 match

I have 2 files "File 1" is delimited by ";" and "File 2" is delimited by "|". File 1 below (3 record shown): Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Discussion started by: vestport
2 Replies

7. Shell Programming and Scripting

How to copy files from one location to another based on a priority?

Hi Gurus, I am a newbie to shell scripting and I am facing a problem right now.I have to automate the copy of files based on a priority.The scenario is as below: 1) There will be files from Mon-Fri with Mon file being named as abc_def_01_YYYYMMDD and Tue file being abc_def_02_YYYYMMDD and so... (4 Replies)
Discussion started by: vikramgk9
4 Replies

8. Shell Programming and Scripting

Copy files from one location to another

I have below files in one location /test/files and also for each dates there are similar files A20130924.0000-0005_file1 A20130924.0000-0005_file2 A20130924.0005-0010_file1 A20130924.0005-0010_file2 . . . A20130924.2355-0000_file1 A20130924.2355-0000_file2 If i execute the script like... (4 Replies)
Discussion started by: Saidul
4 Replies

9. Shell Programming and Scripting

How to copy files from one location to another using xargs??

Hello Experts, I need to copy files from one location to another using xargs. Tried something like this (In Ubuntu & Solaris ). mkdir -p 1234; find /home/emd/Desktop/n007/M007/ -type f -name "A2014*" | xargs -0 cp -r {} /home/emd/Desktop/1234 But every time i run this, a weird error... (6 Replies)
Discussion started by: Saidul
6 Replies

10. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
DateTime::Locale::kn_IN(3)				User Contributed Perl Documentation				DateTime::Locale::kn_IN(3)

NAME
DateTime::Locale::kn_IN SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'kn_IN' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Kannada India. DATA
This locale inherits from the DateTime::Locale::kn locale. It contains the following data. Days Wide (format) XXXXXX XXXXXXX XXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (format) XX. XX. XX. XX. XX. XXX. X. Narrow (format) XX XX XX XX XX X X Wide (stand-alone) XXXXXX XXXXXXX XXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XX. XX. XX. XX. XX. XXX. X. Narrow (stand-alone) XX XX XX XX XX X X Months Wide (format) XXXXX XXXXXXXX XXXXXX XXXXXXX XX XXXX XXXX XXXXXX XXXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX Abbreviated (format) XXXXX XXXXXXXX XXXXXX XXXXXXX XX XXXX XXXX XXXXXX XXXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX Narrow (format) X XX XX X XX XX XX X XX X X XX Wide (stand-alone) XXXXX XXXXXXXX XXXXXX XXXXXXX XX XXXX XXXX XXXXXX XXXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX Abbreviated (stand-alone) XXXXX XXXXXXXX XXXXXX XXXXXXX XX XXXX XXXX XXXXXX XXXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX Narrow (stand-alone) X XX XX X XX XX XX X XX X X XX Quarters Wide (format) XXXX 1 XXXX 2 XXXX 3 XXXXX 4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) XXXX 1 XXXX 2 XXXX 3 XXXXX 4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide XXXXXX. XXXXXXX XX Abbreviated BCE CE Narrow BCE CE Date Formats Full 2008-02-05T18:30:30 = XXXXXXX 5 XXXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXXX 22 XXXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX 15 XXXXXXXXX -10 Long 2008-02-05T18:30:30 = 5 XXXXXXXX 2008 1995-12-22T09:05:02 = 22 XXXXXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXXXXXX -10 Medium 2008-02-05T18:30:30 = 5 XXXXXXXX 2008 1995-12-22T09:05:02 = 22 XXXXXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXXXXXX -10 Short 2008-02-05T18:30:30 = 5-2-08 1995-12-22T09:05:02 = 22-12-95 -0010-09-15T04:44:23 = 15-9--10 Default 2008-02-05T18:30:30 = 5 XXXXXXXX 2008 1995-12-22T09:05:02 = 22 XXXXXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXXXXXX -10 Time Formats Full 2008-02-05T18:30:30 = 06:30:30 pm UTC 1995-12-22T09:05:02 = 09:05:02 am UTC -0010-09-15T04:44:23 = 04:44:23 am UTC Long 2008-02-05T18:30:30 = 06:30:30 pm UTC 1995-12-22T09:05:02 = 09:05:02 am UTC -0010-09-15T04:44:23 = 04:44:23 am UTC Medium 2008-02-05T18:30:30 = 06:30:30 pm 1995-12-22T09:05:02 = 09:05:02 am -0010-09-15T04:44:23 = 04:44:23 am Short 2008-02-05T18:30:30 = 06:30 pm 1995-12-22T09:05:02 = 09:05 am -0010-09-15T04:44:23 = 04:44 am Default 2008-02-05T18:30:30 = 06:30:30 pm 1995-12-22T09:05:02 = 09:05:02 am -0010-09-15T04:44:23 = 04:44:23 am Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXX 5 XXXXXXXX 2008 06:30:30 pm UTC 1995-12-22T09:05:02 = XXXXXXXX 22 XXXXXXXX 1995 09:05:02 am UTC -0010-09-15T04:44:23 = XXXXXX 15 XXXXXXXXX -10 04:44:23 am UTC Long 2008-02-05T18:30:30 = 5 XXXXXXXX 2008 06:30:30 pm UTC 1995-12-22T09:05:02 = 22 XXXXXXXX 1995 09:05:02 am UTC -0010-09-15T04:44:23 = 15 XXXXXXXXX -10 04:44:23 am UTC Medium 2008-02-05T18:30:30 = 5 XXXXXXXX 2008 06:30:30 pm 1995-12-22T09:05:02 = 22 XXXXXXXX 1995 09:05:02 am -0010-09-15T04:44:23 = 15 XXXXXXXXX -10 04:44:23 am Short 2008-02-05T18:30:30 = 5-2-08 06:30 pm 1995-12-22T09:05:02 = 22-12-95 09:05 am -0010-09-15T04:44:23 = 15-9--10 04:44 am Default 2008-02-05T18:30:30 = 5 XXXXXXXX 2008 06:30:30 pm 1995-12-22T09:05:02 = 22 XXXXXXXX 1995 09:05:02 am -0010-09-15T04:44:23 = 15 XXXXXXXXX -10 04:44:23 am 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 XX. -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 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 = XX., 2-5 1995-12-22T09:05:02 = XX., 12-22 -0010-09-15T04:44:23 = XXX., 9-15 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 = XXXXXXXX 1995-12-22T09:05:02 = XXXXXXXX -0010-09-15T04:44:23 = XXXXXXXXX MMMd (MMM d) 2008-02-05T18:30:30 = XXXXXXXX 5 1995-12-22T09:05:02 = XXXXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XX. XXXXXXXX 5 1995-12-22T09:05:02 = XX. XXXXXXXX 22 -0010-09-15T04:44:23 = XXX. XXXXXXXXX 15 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXXXXX 1995-12-22T09:05:02 = 22 XXXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXXXX MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XX. XXXXXXXX 5 1995-12-22T09:05:02 = XX. XXXXXXXX 22 -0010-09-15T04:44:23 = XXX. XXXXXXXXX 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 = XX., 1995-12-22 -0010-09-15T04:44:23 = XXX., -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXXXXXXX 1995-12-22T09:05:02 = 1995 XXXXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XX., 2008 XXXXXXXX 5 1995-12-22T09:05:02 = XX., 1995 XXXXXXXX 22 -0010-09-15T04:44:23 = XXX., -10 XXXXXXXXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXXXXX 1995-12-22T09:05:02 = 1995 XXXXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXXX 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 yyyyMM (MM-yyyy) 2008-02-05T18:30:30 = 02-2008 1995-12-22T09:05:02 = 12-1995 -0010-09-15T04:44:23 = 09--010 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXXX -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXXXXX 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::kn_IN(3)
All times are GMT -4. The time now is 06:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy