Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uwm.edu!ux1.cso.uiuc.edu!bradley.bradley.edu!buhub!data From: data@buhub (Mark Hall) Newsgroups: comp.unix.shell Subject: How to eliminate entire lines with sed Summary: I need to delete lines from the beginnning of a file... Keywords: remove lines, sed Message-ID: <1991Jan25.070712.17725@bradley.bradley.edu> Date: 25 Jan 91 07:07:12 GMT Sender: news@bradley.bradley.edu Organization: Bradley University Lines: 21 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@cleveland.freenet.edu | |-----------------------------------------------------------------------------| | F'net : 1:232/28 1:2250/9 (fname.lname@f.n.z.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 |