How to eliminate entire lines with sed
Mark Hall
data at buhub
Fri Jan 25 18:07:12 AEST 1991
I'm having a minor problem. I want to use a shell script that I have in my
.profile to do some things dealing with mail. I use checkmail and a custom
script that keeps track of the number of new messages. When I log in, it
tells me how many NEW messages I have by subtracting the number of lines
returned from the Checkmail /usr/mail/data | wc -l by the number in the
.mailchk file I create (it only contains a single number).
When I display the messages in my mailbox, I'd like to remove the first "x"
lines from the listing. Any suggestions?
SUmmary: WHat I want to do is pass the number in the .mailchk file and delete
that number of lines from the beginning of my input by using sed.
Mark hall
--
| Internet: data@{bucs1,buhub}.bradley.edu, al632 at cleveland.freenet.edu |
|-----------------------------------------------------------------------------|
| F'net : 1:232/28 1:2250/9 (fname.lname at f<node>.n<net>.z<zone>.fidonet.org) |
|-----------------------------------------------------------------------------|
| "He sees you when you're sleeping, he knows when you're awake, but Captain, |
| it makes no sense!" "But Spock, with Santa, ALL things are possible!" |
| Kirk and Spock...Hallmark Greeting Cards |
More information about the Comp.unix.shell
mailing list