Hai
I have a flat file which contains more than 6 crore lines or records. I want to delete only one line, using line number. For example I want to delete 414556 th line . How to do this using sed or awk command.
thanks (3 Replies)
I have been googling, but cannot find that works for me.
I have a text file tmp.out with contents:
sadfsdf sdfosuidhfousdhof soduhf osdfu osudfhosudhfd
sdfgsdfg
asdfiojhsdf asdoludhflsdjfhskldjfhsdjdlfsjdhnlj h sdja
ouahsdjdafkljsa
oljhljh
I have another file... (11 Replies)
Alright, I'm sure there's a more efficient way to do this... I'm not an expert by any means. What I'm trying to do is search a file for lines that match the two input words (first name, last name) in order to remove that line. The removal part is what I'm struggling with. Here is my code:
echo... (4 Replies)
Hi guys ,
I m writing a script to delete a line at particular location.
But i m unable to use variable for specifying line number.
for example.
sed -n '7!p' filename
works fine and deletes 7th line from my file
but
sed -n '$variable!p' filename
gives following error.
sed: -e... (12 Replies)
I have file with 10000 records and i need to delete the lines in single shot based on line number range say from 10 to 51 , 53 to 59 , 105 to 107, 311 to 592 etc... between range works fine for me but how to achive for above case? please help
sed '10,51 {d}' infile > outfile (5 Replies)
I have a file with ~200K lines, I need to delete 4K lines in it. There is no range.
I do have the line numbers of the lines which I want to be deleted.
I did tried using
> cat del.lines
sed '510d;12d;219d;......;3999d' file
> source del.lines
Word too long.
I even tried... (2 Replies)
Hi
I am using the following command to delete a line from the file by line number:
line_number=14
sed "${line_number}d" inputfilename > newfilename
Is there a way to modify this command to specify the range of lines to be deleted, lets say from line 14 till line 5 ?
I tried using the... (5 Replies)
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Hello,
How can I remove line number 3,6,9,12,15,18 and so on for a text file using sed? The line number pattern is multiple 3.
Thanks in advance. (6 Replies)
Dear Specialists,
I have following data
1 1 2
2 2 3
3 3 6
4 3 4
5 4 9
6 5 11
7 6 7
and I would like to obtain data like below
1 1 2
2 2 3
4 3 4
7 6 7 (2 Replies)
Discussion started by: Ryan Kim
2 Replies
LEARN ABOUT REDHAT
pgmnorm
pgmnorm(1) General Commands Manual pgmnorm(1)NAME
pgmnorm - normalize the contrast in a portable graymap
SYNOPSIS
pgmnorm [-bpercent N | -bvalue N] [-wpercent N | -wvalue N] [pgmfile]
DESCRIPTION
Reads a portable graymap as input. Normalizes the contrast by forcing the lightest pixels to white, the darkest pixels to black, and lin-
early rescaling the ones in between; and produces a portable graymap as output.
OPTIONS
By default, the darkest 2 percent of all pixels are mapped to black, and the lightest 1 percent are mapped to white. You can override
these percentages by using the -bpercent and -wpercent flags, or you can specify the exact pixel values to be mapped by using the -bvalue
and -wvalue flags. Appropriate numbers for the flags can be gotten from the pgmhist tool. If you just want to enhance the contrast, then
choose values at elbows in the histogram; e.g. if value 29 represents 3% of the image but value 30 represents 20%, choose 30 for bvalue.
If you want to lighten the image, then set bvalue to 0 and just fiddle with wvalue; similarly, to darken the image, set wvalue to maxval
and play with bvalue.
All flags can be abbreviated to their shortest unique prefix.
SEE ALSO pgmhist(1), ppmnorm(1), pgm(5)AUTHOR
Partially based on the fbnorm filter in Michael Mauldin's "Fuzzy Pixmap" package.
Copyright (C) 1989 by Jef Poskanzer.
28 February 1989 pgmnorm(1)