![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Display Modes | Rate This Thread |
|
|