![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delete lines | mohan705 | UNIX for Advanced & Expert Users | 2 | 04-04-2008 10:09 AM |
| How to delete first 5 lines and last five lines in all text files | ragavendran31 | Shell Programming and Scripting | 10 | 02-21-2008 07:58 AM |
| delete some lines | fongthai | Shell Programming and Scripting | 2 | 10-16-2007 11:54 PM |
| delete blank lines or lines with spaces only | vascobrito | UNIX for Dummies Questions & Answers | 3 | 01-13-2004 07:36 AM |
| delete lines.. | alisevA3 | UNIX Desktop for Dummies Questions & Answers | 8 | 05-29-2002 09:33 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to delete more lines
Hi experts !
I need to delete two range of lines in this command. Is that possible ? ie. line 1 - 22 and 36 to 40. How do i do this in one go ?? ls -1t ${RESULT}/*.trc | while read TRACE_FILE do grep CONTROLFILE ${TRACE_FILE} rc=$? if [[ $rc -eq 0 ]] then sed -e ' 1,22d s/'${ORACLE_SID}'/'${TARGET}'/g /\# Recovery/,/ARCHIVE LOG ALL;/d s/REUSE DATABASE/SET DATABASE/ s/NORESETLOGS ARCHIVELOG/RESETLOGS NOARCHIVELOG/ s/ALTER DATABASE OPEN/ALTER DATABASE OPEN RESETLOGS/ ' ${TRACE_FILE} > ${OUT_CTL} break fi done Thanks in advance |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|