Sponsored Content
Top Forums Shell Programming and Scripting delete multiple lines by line number Post 302487943 by anurag.singh on Friday 14th of January 2011 07:53:25 AM
Old 01-14-2011
Yes, Bottom up is not needed. Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending line number to each line and getting total number of lines

Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me. I have a file say: abc def ccc ddd ffff The output should be: Instance1=abc Instance2=def Instance3=ccc Instance4=ddd Instance5=ffff ... (2 Replies)
Discussion started by: chiru_h
2 Replies

2. UNIX for Dummies Questions & Answers

delete multiple lines by line number

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)
Discussion started by: ChicagoBlues
11 Replies

3. Shell Programming and Scripting

Delete lines based on line number

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)
Discussion started by: novice_man
2 Replies

4. Shell Programming and Scripting

How to delete several lines from file by line number?

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)
Discussion started by: aoussenko
5 Replies

5. Shell Programming and Scripting

splitting a huge line of file into multiple lines with fixed number of columns

Hi, I have a huge file with a single line. But I want to break that line into lines of with each line having five columns. My file is like this: code: "hi","there","how","are","you?","It","was","great","working","with","you.","hope","to","work","you." I want it like this: code:... (1 Reply)
Discussion started by: rajsharma
1 Replies

6. 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

7. UNIX for Dummies Questions & Answers

How to delete lines above a certin line number in bash shell

Hi, I have written a script that returns the line number of the pattern i want and i stored the line number in a variable(getlinenumber).Now i want to delete all the lines in a file above this line number which is stored in a variable. i am using sed '1,$getlinenumberd' > file1.txt which is... (2 Replies)
Discussion started by: learninguser235
2 Replies

8. UNIX for Dummies Questions & Answers

How to delete lines above a certin line number in bash shell

Hi, I have written a script that returns the line number of the pattern i want and i stored the line number in a variable.Now i want to delete all the lines in a file above this line number which is stored in a variable. i am using sed '1,$getlinenumberd' > file1.txt which is not working(wrog... (5 Replies)
Discussion started by: learninguser235
5 Replies

9. Shell Programming and Scripting

Removing carriage returns from multiple lines in multiple files of different number of columns

Hello Gurus, I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file. 1|ABC DEF|100|10 2|PQ RS T|200|20 3| UVWXYZ|300|30 4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 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
gifbg(1)						      General Commands Manual							  gifbg(1)

NAME
gifbg - A program to generate a single-color test pattern GIF with gradually changing intensity in any of the basic 8 directions. USAGE
gifbg [-q] [-d Dir] [-l #Lvls] [-c R G B] [-m MinI] [-M MaxI] [-s W H] [-h] The gifbg program reads no input, and will dump the created GIF file to stdout. MEMORY REQUIRED
Line. OPTIONS
[-q] Quiet mode. Defaults off on MSDOS, on under UNIX. Controls printout of running scan lines. Use -q- to invert. [-d Dir] Select direction the intensity of the background should increase. Direction can be one of the 8 principal directions: T - for Top "TR" - for Top Right "R" - for Right "BR" - for Bottom Right "B" - for Bottom "BL" - for Bottom Left "L" - for left "TL" - for Top Left The compass directions may be use as synonyms for the above directions, so for example "NE" is equal to "TR". Direction is case insensitive. The default direction is Top (North). [-l #Lvls] Number of levels the color will be scaled to. Default is 16. [-c R G B] What to use as the primary background color to scale. This color is scaled between the minimum intensity (MinI) and maximum inten- sity (MaxI) from one end of the screen to the other as defined by Dir. See below (-m & -M) for MinI & MaxI. Default is Blue (0, 0, 255). [-m MinI] Minimum intensity (in percent) to scale color. Default 10% [-M MaxI] Maximum intensity (in percent) to scale color. Default 100% [-s W H] Size of image to create. Default 640 by 350. [-h] Print one line of command line help, similar to Usage above. NOTES
If MinI == MaxI = 100 (%) and #Lvls == 2 then boolean mask image of specified size will be created - all foreground. This can be used as a square mask for the <a href="gifcomb.html"> AUTHOR
Gershon Elber Man page created by T.Gridel <tgridel@free.fr>, originally written by Eric S. Raymond <esr@thyrsus.com> giflib-tools gifbg(1)
All times are GMT -4. The time now is 03:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy