05-01-2011
I have one more thread: Korn shell program to parse CSV text file and insert values into Oracle database. I would appreciate if you have any suggestions.
My only concern is: when there is space between words for a field, i don't think i am getting correct output.
Thanks for your help.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies
2. UNIX for Advanced & Expert Users
The following output has a space as the Field Separator.
I need:
$1 Set the field width to 15 then zero-fill to the right.
$6 Set the field width to 15 then zero-fill to the left.
01-10016 1000 MV010 20090708 12003 $NK0015101 01
01-100161 12000 MV070 20090708 12003 $NK0015201 01... (6 Replies)
Discussion started by: talk2pawee
6 Replies
3. Shell Programming and Scripting
Hi Everyone,
# cat 1.txt
1321631,77770132976455,19,20091001011859,20091001011907
1321631,77770132976455,19,20091001011859,20091001011907
1321631,77770132976455,19,20091001011859,20091001011907
# cat 1.txt | awk -F, '{OFS=",";print $1,$3,$4,$5}'
1321631,19,20091001011859,20091001011907... (7 Replies)
Discussion started by: jimmy_y
7 Replies
4. Shell Programming and Scripting
I have data that is tab delimited and looks like:
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no -... (5 Replies)
Discussion started by: bradg
5 Replies
5. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
6. Shell Programming and Scripting
I'm trying to compare 2 files for differences in a selct number of fields. When differnces are found it will write the whole record of the second file including appending '|C' out to a delta file. Each record will have 20 fields, but only want to do comparison of 1st 15 fields. The 1st field of... (7 Replies)
Discussion started by: sljnk
7 Replies
7. Shell Programming and Scripting
Hi
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
Discussion started by: newstart
9 Replies
8. Shell Programming and Scripting
The below code works great, kindly provided by @Don Cragun, the lines in bold print the current output. Since some of the fields printed can be blank some of the fields are shifted. I can not seem too add . to the blank fields like in the desired output. Basically, if there is nothing in the field... (10 Replies)
Discussion started by: cmccabe
10 Replies
9. Shell Programming and Scripting
I am trying to use awk to format the file below, which is tab-delimited. The desired out is space delimited and is in the order of
$9 $13 $2 $10-$11.$10 and $11 are often times multiple values separated by a comma, so the value in $10 is combined with the first value from
$11 using the comma.... (5 Replies)
Discussion started by: cmccabe
5 Replies
10. UNIX for Beginners Questions & Answers
Hi,
Below are the sample files. x.txt is from an Excel file that is a list of users from Windows and y.txt is a list of database account.
$ head -500 x.txt y.txt
==> x.txt <==
TEST01 APP_USER_PROFILE
USER03 APP_USER_PROFILE
TEST02 APP_USER_EXP_PROFILE
TEST04 APP_USER_PROFILE
USER01 ... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT DEBIAN
apache::session::oracle
Apache::Session::Oracle(3pm) User Contributed Perl Documentation Apache::Session::Oracle(3pm)
NAME
Apache::Session::Oracle - An implementation of Apache::Session
SYNOPSIS
use Apache::Session::Oracle;
#if you want Apache::Session to open new DB handles:
tie %hash, 'Apache::Session::Oracle', $id, {
DataSource => 'dbi:Oracle:sessions',
UserName => $db_user,
Password => $db_pass,
Commit => 1
};
#or, if your handles are already opened:
tie %hash, 'Apache::Session::Oracle', $id, {
Handle => $dbh,
Commit => 1
};
DESCRIPTION
This module is an implementation of Apache::Session. It uses the Oracle backing store and no locking. See the example, and the
documentation for Apache::Session::Store::Oracle for more details.
USAGE
The special Apache::Session argument for this module is Commit. You MUST provide the Commit argument, which instructs this module to
either commit the transaction when it is finished, or to simply do nothing. This feature is provided so that this module will not have
adverse interactions with your local transaction policy, nor your local database handle caching policy. The argument is mandatory in order
to make you think about this problem.
This module also respects the LongReadLen argument, which specifies the maximum size of the session object. If not specified, the default
maximum is 8 KB.
AUTHOR
This module was written by Jeffrey William Baker <jwbaker@acm.org>.
SEE ALSO
Apache::Session::File, Apache::Session::Flex, Apache::Session::DB_File, Apache::Session::Postgres, Apache::Session
perl v5.10.1 2010-10-18 Apache::Session::Oracle(3pm)