This could be an example of a record I have to work with:
I read it from a csv file in UNIX format.
The result of the simple script example I posted before is that this informations are printed in multiple lines... and some caracters are disappearing, so I have no possibility to work with it...
I really have no idea......
Thank you!
---------- Post updated at 03:00 PM ---------- Previous update was at 02:56 PM ----------
My intention was to use the pattern "," as separator for the field and add an empty field where it needs it, with awk.
But Double Quote are disappearing...And the single record is splitted in little parts...
mmm...
Last edited by vgersh99; 09-02-2009 at 01:47 PM..
Reason: code tags, PLEASE!
Still working on manipulating SQL statements. Some are very long (10-20k). I'm using a shell script to read the SQL statements that are stored in a DB2 table and writing the records out to a file on Unix. The records appear to be getting truncated at 8k.
Is there any way for me to avoid the... (1 Reply)
Hi, I'm writing a long script for bash (on RHEL 5.0) to execute many commands. So, my idea is to create a function to deal with error checking and logging (see ceckoutput() below). This works with all commands except for sed. I think it may be a problems with escaped characters. So I did the... (4 Replies)
I have a text file which represents a http flow like this:
HTTP/1.1 200 OK
Date: Fri, 23 Jan 2009 17:16:24 GMT
Server: Apache
Last-Modified: Fri, 23 Jan 2009 17:08:03 GMT
Accept-Ranges: bytes
Cache-Control: max-age=540
Expires: Fri, 23 Jan 2009 17:21:31 GMT
Vary: Accept-Encoding ... (1 Reply)
Hello,
I am currently trying to edit an ldif file. The ldif specification states that a newline followed by a space indicates the subsequent line is a continuation of the line. So, in order to search and replace properly and edit the file, I open the file in textwrangler, search for "\r " and... (14 Replies)
Hi all-
I've got a file that will have multiple columns. In one column there will be a string that is 10 digits in length, but I need to trim the first four zeros to make it 6 characters?
example:
0000001234
0000123456
0000234566
0000000321
output:
001234
123456
234566
000321 (5 Replies)
how i can read a long integer from standar input and a string with as many characters as specified in the number?
i thing that i must use the read command ofcourse.... (6 Replies)
Hi, this is my first post and hope to make some contribution soon.
I'm still learning the basics of UNIX and Linux and BASH. Thus my need to understand the subject at hand. I don't have a problem with technical detail, so hit me :)
I have a script where two commands use the contents of a... (2 Replies)
Hi Friends ,
Need help here , I Have a file which has as a number of rows (records) in it .
00012919 7836049 S
00012920 7836049 S
00012921 3828157 Y
00012922 3828157 Y
00012923 3828157 S
T005290070331000012923
I Have another file which has few more... (3 Replies)
Hi Experts,
I have a Unix csv file which has long records ie the record length is more than 80 so it goes to the next line.So when its in unix though it spans to two or three lines it still counts it as one record.
But what is happening is for the records that are long when i copy it into excel i... (0 Replies)
Good morning all, I have a machine running IRIX and I need to edit a text file on the terminal that is literally thousands of lines. Does anyone know the most efficient way to edit portions of files like these? Obviously simply using the vi command isn't going to work since I get a too many lines... (1 Reply)
Discussion started by: James C
1 Replies
LEARN ABOUT DEBIAN
convert::nls_date_format
Convert::NLS_DATE_FORMAT(3pm) User Contributed Perl Documentation Convert::NLS_DATE_FORMAT(3pm)NAME
Convert::NLS_DATE_FORMAT - Convert Oracle NLS_DATE_FORMAT <-> strftime Format Strings
SYNOPSIS
use Convert::NLS_DATE_FORMAT qw(oracle2posix posix2oracle);
my $strptime = oracle2posix($NLS_DATE_FORMAT);
$NLS_DATE_FORMAT = posix2oracle($strftime);
DESCRIPTION
Convert Oracle's NLS_DATE_FORMAT string into a strptime format string, or the reverse.
Functions
oracle2posix
Takes an Oracle NLS_DATE_FORMAT string and converts it into formatting string compatible with "strftime" or "strptime".
my $format = oracle2posix('YYYY-MM-DD HH24:MI:SS'); # '%Y-%m-%d %H:%M:%S'
Character sequences that should not be translated may be enclosed within double quotes, as specified in the Oracle documentation.
my $format = oracle2posix('YYYY-MM-DD"T"HH24:MI:SS'); # '%Y-%m-%dT%H:%M:%S'
posix2oracle
Takes a "strftime" or "strptime" formatting string and converts it into an Oracle NLS_DATE_FORMAT string. It is possible to create
strings which Oracle will not accept as valid NLS_DATE_FORMAT strings.
my $format = posix2oracle('%Y-%m-%d %H:%M:%S'); # 'YYYY-MM-DD HH24:MI:SS'
EXPORT
None by default. "oracle2posix" and "posix2oracle" when asked.
SEE ALSO
DateTime::Format::Oracle.
AUTHOR
Nathan Gray, <kolibrie@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2005, 2006, 2011, 2012 Nathan Gray
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2012-01-18 Convert::NLS_DATE_FORMAT(3pm)