Search Results

Search: Posts Made By: vk2012
3,801
Posted By vk2012
:) Thanks! It works fine.
:) Thanks! It works fine.
3,801
Posted By vk2012
Hi Franklin, Thanks a lot ! It almost...
Hi Franklin,

Thanks a lot !

It almost worked. :b:
Except that some additional lines are deleted.

This is because pattern2 and pattern3 are occurring more than once in the file.
Pattern1...
3,801
Posted By vk2012
Hi I tried this : (awk...
Hi

I tried this :

(awk '/pattern1/{/^pattern2/,/^pattern3/{next}1}'try > try2 )

The error I got was :
awk: cmd. line:1: /pattern1/{/^pattern2/,/^pattern3/{next}1}try
awk: cmd. line:1: ...
3,801
Posted By vk2012
Delete Lines : after pattern1 and between pattern2 and pattern3 using awk/sed/perl
Hi

I need to delete lines from a file which are after pattern1 and between pattern 2 and patter3, as below:

aaaaaaaa
bbbbbbbb
pattern1
cdededed
ddededed
pattern2
fefefefe <-----Delete...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 12:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy