printing only desired number of lines
hi
suppose there are 100 lines in my file.and i want to save (redirect) line nu-50 to 100 in onother file. but plz note that line number 50 will be given by the user, so it can be anything. suppose if user print 67, then i have to process user input & print 67-100 lines i think u get my problem. thanks |
Code:
man tail |
Hi,
Here's a rough example using sed: Code:
#!/bin/bash Quote:
Hope this helps. |
Code:
tail -n 50 file |
All times are GMT -5. The time now is 02:34 PM. |