Sponsored Content
Full Discussion: how to delete lines
Top Forums Shell Programming and Scripting how to delete lines Post 302273141 by nj78 on Friday 2nd of January 2009 08:31:45 PM
Old 01-02-2009
If you are familiar with egrep and regular expressions, then just cat the file and pipe to egrep -v to remove what you don't need. Good exercise to learn this, plenty of material to find using google.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to delete first 5 lines and last five lines in all text files

Hi I want to delete first five and last five lines in text files without opening the file and also i want to keep the same file name for all the files. Thanks in advance!!! Ragav (10 Replies)
Discussion started by: ragavendran31
10 Replies

2. Shell Programming and Scripting

Grep and delete lines except the lines with strings

Hi I am writing a script which should read a file and search for certain strings 'approved' or 'removed' and retain only those lines that contain the above strings. Ex: file name 'test' test: approved package waiting for approval package disapproved package removed package approved... (14 Replies)
Discussion started by: vj8436
14 Replies

3. Shell Programming and Scripting

How to delete lines in a file that have duplicates or derive the lines that aper once

Input: a b b c d d I need: a c I know how to get this (the lines that have duplicates) : b d sort file | uniq -d But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Discussion started by: necroman08
3 Replies

4. Shell Programming and Scripting

sed problem - delete all lines until a match on 2 lines

First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible ) I got a file (trace file to recreate the control file from oracle for the dba boys) which contains some lines another line... (11 Replies)
Discussion started by: plelie2
11 Replies

5. UNIX for Dummies Questions & Answers

How get only required lines & delete the rest of the lines in file

Hiiii I have a file which contains huge data as a.dat: PDE 1990 1 9 18 51 28.90 24.7500 95.2800 118.0 6.1 0.0 BURMA event name: 010990D time shift: 7.3000 half duration: 5.0000 latitude: 24.4200 longitude: 94.9500 depth: 129.6000 Mrr: ... (7 Replies)
Discussion started by: reva
7 Replies

6. Shell Programming and Scripting

need to delete all lines from a group of files except the 1st 2 lines

Hello, I have a group of text files with many lines in each file. I need to delete all the lines in each and only leave 2 lines in each file. (3 Replies)
Discussion started by: script_op2a
3 Replies

7. UNIX for Advanced & Expert Users

In a huge file, Delete duplicate lines leaving unique lines

Hi All, I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space. I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies

8. Shell Programming and Scripting

search and replace, when found, delete multiple lines, add new set of lines?

hey guys, I tried searching but most 'search and replace' questions are related to one liners. Say I have a file to be replaced that has the following: $ cat testing.txt TESTING AAA BBB CCC DDD EEE FFF GGG HHH ENDTESTING This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies

9. Shell Programming and Scripting

Sed/awk to delete single lines that aren't touching other lines

Hello, I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below). Example: one two three four five six seven eight I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies

10. UNIX for Beginners Questions & Answers

Delete multiple lines between blank lines containing two patterns

Hi all, I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex: user: alpha parameter_1 = 15 parameter_2 = 1 parameter_3 = 0 user: alpha parameter_1 = 15 parameter_2 = 1 parameter_3 = 0 user: alpha parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
hbpldecode(1)						      General Commands Manual						     hbpldecode(1)

NAME
hbpldecode - Decode a HBPL stream into human readable form. SYNOPSIS
hbpldecode [options] <hbpl-file DESCRIPTION
hbpldecode decodes a HBPL stream into human readable form. A HBPL stream is the printer langauge used by the Fuji-Xerox cp105b and the Dell 1250c printers. COMMAND LINE OPTIONS
These are the options that can appear on the command line. -d basename Basename of .pbm file for saving decompressed planes. -h Print hex file offsets. -o Print file offsets. -D level Set Debug level [0]. EXAMPLES
Decode an HBPL stream file. $ hbpldecode -h 1250c-mono.prn 0: 33%-12345X@PJL JOB MODE=PRINTER 1f: @PJL SET STRINGCODESET=UTF8 3b: @PJL COMMENT DATE=06/01/2011 58: @PJL COMMENT TIME=13:28:30 73: @PJL COMMENT DNAME=empty - Notepad 96: @PJL SET JOBATTR="@LUNA=rick" b4: @PJL SET COPIES=1 c6: @PJL SET QTY=1 d5: @PJL SET JOBATTR="@TRCH=OFF" f2: @PJL SET DUPLEX=OFF 106: @PJL SET BINDING=LONGEDGE 120: @PJL SET RENDERMODE=GRAYSCALE 13e: @PJL SET ECONOMODE=OFF 155: @PJL SET RET=ON 165: @PJL SET JOBATTR="@IREC=OFF" 182: @PJL SET JOBATTR="@HOAD=I0A00020F" 1a5: @PJL SET JOBATTR="@JOAU=rick" 1c3: @PJL SET JOBATTR="@CNAM=RICK-VB" 1e4: @PJL SET IWAMANUALDUP=OFF 1fe: @PJL SET IWAJAMRECOVERY=AUTO 21b: @PJL SET JOBATTR="@MSIP=NORMAL" 23b: @PJL SET PAPERDIRECTION=SEF 257: @PJL SET RESOLUTION=600 26f: @PJL SET BITSPERPIXEL=8 287: @PJL SET JOBATTR="@DRDM=RASTER" 2a7: @PJL SET JOBATTR="@TCPR=33" 2c3: @PJL SET JOBATTR="@TUCR=33" 2df: @PJL SET JOBATTR="@TTRC=33" 2fb: @PJL SET JOBATTR="@TSCR=33" 317: @PJL SET JOBATTR="@GCPR=33" 333: @PJL SET JOBATTR="@GUCR=33" 34f: @PJL SET JOBATTR="@GTRC=33" 36b: @PJL SET JOBATTR="@GSCR=33" 387: @PJL SET JOBATTR="@ICPR=34" 3a3: @PJL SET JOBATTR="@IUCR=34" 3bf: @PJL SET JOBATTR="@ITRC=34" 3db: @PJL SET JOBATTR="@ISCR=34" 3f7: @PJL SET JOBATTR="@TDFT=0" 412: @PJL SET JOBATTR="@GDFT=0" 42d: @PJL SET JOBATTR="@IDFT=0" 448: @PJL ENTER LANGUAGE=HBPL 461: RECTYPE 'A' [0x41]: 462: 81 a1: 0x0 465: 82 a2: 0x7 469: 83 a2: 0x1 46d: RECTYPE 'C' [0x43]: 46e: 91 a1: 0x0 471: 92 a1: 0x1 474: 93 a1: 0x1 477: 94 a1: 0x0 47a: 95 c2: 0x0 480: 96 a1: 0x0 483: 97 c3: 0x0 489: 98 a1: 0x0 48c: 99 a4: 1 [PAGECNT] 492: 9a c4: 5104x6600 [WxH] 49c: 9b a1: 0x0 49f: 9c a1: 0x1 4a2: 9d a1: 0x9 4a5: 9e a1: 0x2 4a8: 9f a1: 0x5 4ab: a0 a1: 0x8 4ae: a1 a1: 0x0 4b1: a2 c4: 5104x6600 [WxH] 4bb: RECTYPE 'Q' [0x51]: 4bc: RECTYPE 'R' [0x52]: 4bd: a3 a1: 0x0 4c0: a4 a2: 6457 (0x1939) bytes of data... 1dfe: RECTYPE 'S' [0x53]: 1dff: RECTYPE 'D' [0x44]: 1e00: RECTYPE 'B' [0x42]: 1dff: 33%-12345X@PJL EOJ FILES
/usr/bin/hbpldecode AUTHOR
Rick Richardson <rick.richardson@comcast.net>
All times are GMT -4. The time now is 07:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy