Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!swbatl!dwn From: dwn@swbatl.sbc.com (David Neill-OKCy Mktg 405-278-4007) Newsgroups: comp.unix.questions Subject: Re: Working with sed Message-ID: <1990Aug10.174333.6371@swbatl.sbc.com> Date: 10 Aug 90 17:43:33 GMT References: <994@netmbx.UUCP> <13513@smoke.BRL.MIL> <27372@unix.cis.pitt.edu> <1157@vision.UUCP> Reply-To: dwn@swbatl.UUCP (David Neill-OKCy Mktg 405-278-4007) Organization: Southwestern Bell Tele. Co. - Advanced Technology Lab - St. Louis Lines: 13 >In article <27372@unix.cis.pitt.edu> nr3m@unix.cis.pitt.edu (Matthew A Henry) writes: >I'm writing a script that uses sed, >and am having trouble with one >part. I have a file that contains typical unix paths, one per >line, and would like to remove everything after the last forward >slash (/). sed -e 's/\/[^\/]*$//' filename -- name & address (this account) -> uunet!swbatl!dwn OR dwn@swbatl.sbc.com David Neill office -> 405-291-1990 -> uunet!swbatl!oktext!mktco Mgr - Mktg.(SWBTCo) home -> 405-749-1141 -> uunet!swbatl!oktext!frodo!david