![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| help me in sending parameters from sqlplus script to unix shell script | Hara | Shell Programming and Scripting | 2 | 01-29-2008 03:31 PM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 03:06 AM |
| here document to automate perl script that call script | hogger84 | Shell Programming and Scripting | 3 | 10-22-2007 10:15 AM |
| returning to the parent shell after invoking a script within a script | gurukottur | Shell Programming and Scripting | 5 | 09-26-2006 07:05 AM |
| return valuse from child script to parent script | borncrazy | Shell Programming and Scripting | 1 | 08-20-2004 03:39 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
help in sed script
I am having a shell script that connects to database half hourly and pulls out the backlog from some tables. Now that logfile is growing too big and I need to housekeep it! effectively I want to keep last 30 days data in that file and move rest to archived file.
The file contents are as below. the algorithm I want is as follow : take input file my.log go to first line, check if this is more than 90 days if it is then pick those lines fom log file till the next sql plus ( i.e. that block) and append to some archive file ( difficult ?) delete these lines from current file if it is not then leave it as it is can somebody help me writting this please ? ---------------------------------------------------------------------------------SQL*Plus: Release 8.1.7.0.0 - Production on Thu Feb 27 19:20:00 2003 (c) Copyright 2000 Oracle Corporation. All rights reserved. Enter user-name: Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production With the Partitioning option JServer Release 8.1.7.4.0 - 64bit Production SQL> SQL> 76834445 SQL> 76834445 SQL> 2 3 4 5 6 7 8 9 ELFORDE 75241084 1593361 25-NOV-02 18:18:10 HEWITTSA 76238384 596061 20-DEC-02 09:18:09 SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Pro duction With the Partitioning option JServer Release 8.1.7.4.0 - 64bit Production SQL*Plus: Release 8.1.7.0.0 - Production on Thu Feb 27 19:50:00 2003 (c) Copyright 2000 Oracle Corporation. All rights reserved. Enter user-name: Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production With the Partitioning option JServer Release 8.1.7.4.0 - 64bit Production --------------------------------------------------------------------------------- Thanks in advance. |
| Bookmarks |
| Tags |
| awk, awk trim, solaris, trim, trim awk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|