The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Adding a date as a first column figaro UNIX for Dummies Questions & Answers 2 05-21-2008 06:00 PM
adding or subtracting days in the o/p of date St.Fartatric UNIX for Dummies Questions & Answers 1 05-19-2008 08:10 AM
Adding New Nodes to Your Oracle RAC 10g Cluster on Linux iBot Oracle Updates (RSS) 0 04-06-2008 06:10 AM
adding date to cron log JohnH Shell Programming and Scripting 2 09-18-2006 10:07 AM
Formatting Date (adding a month) devid UNIX for Dummies Questions & Answers 4 01-18-2006 10:31 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-06-2008
KrisOracleGuy KrisOracleGuy is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 2
Question Adding date to oracle exp log

I want to add a date/time stamp to the front of each line in an oracle exp log file. I created a shell script:

rm -f expTest.Pipe
mknod expTest.Pipe p
date "+%Y.%m.%d %T"
nawk -f expTest.nawk expTest.Pipe > expTest.Tlog &
exp userid=UID/PW@DB file=expTest.dmp log=expTest.log owner=OWNER 2>> expTest.Pipe
date "+%Y.%m.%d %T"
rm -f expTest.Pipe

and a nawk script (expTest.nawk):

BEGIN {
DT= "date \"+%Y.%m.%d %T\""
DT | getline cur_date
close(DT)
}
{
print cur_date, $0;
}

But when run, the date values are all the same (the start time of the script), even thought this takes about 60 seconds to complete.

Running on Solaris. I've tried awk but it repeatedly fails on the 'DT | ...' line

What am I doing wrong? Thanks in advance.
 

Bookmarks

Tags
date command, exp, nawk, oracle

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:37 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0