![]() |
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 |
| 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 |
| vi to remove lines in file | kjbaumann | UNIX for Dummies Questions & Answers | 2 | 03-13-2009 03:40 AM |
| remove lines from file | bluemoon1 | Shell Programming and Scripting | 9 | 11-09-2007 01:40 AM |
| how to remove specific lines from a file | bluemoon1 | Shell Programming and Scripting | 17 | 10-07-2007 10:40 PM |
| To remove the extra spaces in unix | Sho | UNIX for Dummies Questions & Answers | 4 | 05-04-2006 05:58 AM |
| Remove Duplicate Lines in File | Teh Tiack Ein | Shell Programming and Scripting | 5 | 01-12-2006 08:30 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
remove extra lines in the file
Hi,
I have some files, with some extra lines in weird characters on the top and bottom of the. I want to get rid of those line. Is there a way I can do that? example of the input file. I want to get rid of those lines in bold Code:
[?25h[2J[?4l[?1l[0m[1;24r[?3h[?3h
07:46 AM Tue Mar 29 2005
Page: 1
SCAD
sale report
Location Sales Report
03/28/05 12:00AM Thru 03/28/05 11:59PM
Blackboard Inc. End
[?3l
in pick_p 1
in pick_p 1
in pick_p 1
in pick_p 1
in pick_p 1
in pick_p 2
in pick_p 3
in pick_p 4
in pick_p 5
in pick_p 6
in pick_p 7
in pick_p 8
in pick_p 9
in pick_p 0
in pick_p 11
in pick_p -2
our pick_p
CT |
|
||||
|
here is the results from "od -c myfile"
Code:
0000000 033 ( B 033 [ ? 2 5 h 033 [ 2 J 033 [ ? 0000020 4 l 033 [ ? 1 l 033 [ 0 m 033 [ 1 ; 2 0000040 4 r 033 [ ? 3 h 033 [ ? 3 h \n 0000060 * 0000200 \n 0000220 * 0000300 0 7 : 4 5 A M T u 0000320 e M a r 2 9 2 0 0 5 \n 0000340 * 0000440 P a g e : 1 \n 0000460 * 0000600 \n 0000620 0000640 S C A D 0000660 * 0000720 \n 0000740 0000760 s a l e r e p o r t 0001000 * 0001040 \n 0001060 L 0001100 o c a t i o n S a l e s R e 0001120 p o r t 0001140 0001160 \n 0001200 0 3 / 2 8 / 0 5 0001220 1 2 : 0 0 A M T h r u 0 3 0001240 / 2 8 / 0 5 1 1 : 5 9 P M 0001260 0001300 \n \n \n \n \n 0001320 0001340 B l a c k b o a r d 0001360 I n c . 0001400 0001420 E n d \f \n \n \r 033 0001440 [ ? 3 l \n i n p i c k _ p 1 0001460 \n i n p i c k _ p 1 \n i n 0001500 p i c k _ p 1 \n i n p i c k 0001520 _ p 1 \n i n p i c k _ p 1 0001540 \n i n p i c k _ p 2 \n i n 0001560 p i c k _ p 3 \n i n p i c k 0001600 _ p 4 \n i n p i c k _ p 5 0001620 \n i n p i c k _ p 6 \n i n 0001640 p i c k _ p 7 \n i n p i c k 0001660 _ p 8 \n i n p i c k _ p 9 0001700 \n i n p i c k _ p 0 \n i n 0001720 p i c k _ p 1 1 \n i n p i c 0001740 k _ p - 2 \n o u r p i c k _ 0001760 p \n 0001762 CT |
|
||||
|
vgersh99,
That works for only the first line in the file, but those last lines still there. I want those to be remove also (those that in bold in the first post): Code:
0001340 B l a c k b o a r d 0001360 I n c . 0001400 0001420 E n d \f \n \n \r 033 0001440 [ ? 3 l \n i n p i c k _ p 1 0001460 \n i n p i c k _ p 1 \n i n 0001500 p i c k _ p 1 \n i n p i c k 0001520 _ p 1 \n i n p i c k _ p 1 0001540 \n i n p i c k _ p 2 \n i n 0001560 p i c k _ p 3 \n i n p i c k 0001600 _ p 4 \n i n p i c k _ p 5 0001620 \n i n p i c k _ p 6 \n i n 0001640 p i c k _ p 7 \n i n p i c k 0001660 _ p 8 \n i n p i c k _ p 9 0001700 \n i n p i c k _ p 0 \n i n 0001720 p i c k _ p 1 1 \n i n p i c 0001740 k _ p - 2 \n o u r p i c k _ 0001760 p \n 0001762 CT |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|