Re: Need help with sed statement

2010-05-04 Thread Roberto Ragusa
David Bartmess wrote: I'm trying to express only the filename from a filepath, i.e., whoopie.txt from /opt/dev/whoopie.txt. I see you already have received solutions. Here is a simpler one (no sed, no basename): COMPLETEPATH=aa/bb/cc/dd ONLYFILENAME=${COMPLETEPATH##*/} -- Roberto

Re: Need help with sed statement

2010-05-04 Thread Patrick O'Callaghan
On Tue, 2010-05-04 at 14:11 +0200, Roberto Ragusa wrote: David Bartmess wrote: I'm trying to express only the filename from a filepath, i.e., whoopie.txt from /opt/dev/whoopie.txt. I see you already have received solutions. Here is a simpler one (no sed, no basename):

Re: Need help with sed statement

2010-05-03 Thread Kwan Lowe
On Mon, May 3, 2010 at 11:37 PM, David Bartmess dingod...@edingo.net wrote: Not sure if this is the right place, but I need help with a sed replacement expression. I'm trying to express only the filename from a filepath, i.e., whoopie.txt from /opt/dev/whoopie.txt. Basically I'm reading the

Re: Need help with sed statement

2010-05-03 Thread Chris Tyler
On Mon, 2010-05-03 at 21:37 -0600, David Bartmess wrote: Not sure if this is the right place, but I need help with a sed replacement expression. I'm trying to express only the filename from a filepath, i.e., whoopie.txt from /opt/dev/whoopie.txt. Basically I'm reading the files that