dkonerding@eagle.wesleyan.edu (09/10/89)
I've got a simple (and serious) question: I'm new to Unix (a friend got me an account on a computer halfway across the world. I've been using EVE (VMS editor) for ages now, and I've gotten quite used to it. Now I'm using ed and vi, and I want to make my life easier-- I get files (often in part01...part0n) using FTP and when they are shar format, I need to get rid of everything before the "---------" line. How can I accomplish this without a great deal of work? I've been reading the man page of ed, but since I'm very busy, I haven't had time to experiment. I'm basically typing "1,10l" to see how many lines I have until I hit the "-----", and then typing "1,nd", but this is slow and little more than a kludge. Is there a program that will strip off all text before the '-----" that I can FTP anonymously? One that will allow me to "strip part*" (wildcard strip)? Thanks! _____________________________________________________________________________ |DKONERDING@EAGLE.WESLEYAN.EDU |My opinions are not those of Apple| |DKONERDING%EAGLE@WESLEYAN(?) |Computer, or DEC, or IBM, or even | |_________________________________________|Raphael Juarez, which is fortunate| |because I don't work for any of | |them._____________________________|
ok@cs.mu.oz.au (Richard O'Keefe) (09/11/89)
In article <1126@eagle.wesleyan.edu>, dkonerding@eagle.wesleyan.edu writes: > .. I'm using ed and vi, ... I need to get rid of everything before the > "---------" line. How can I accomplish this ... 1,/^--*$/d Delete from line 1 down to a line which consists entirely of dashes and contains at least one dash. More generally, you may want "unshar", a version of which was posted in 1988 by Bill Davidsen (davidsen@sixhub.uucp) as part of his "cshar" package.