Date: Wed, 16 Jun 2010 08:55:09 -0500 From: Randy Belk <randy.belk@gmail.com> To: Aiza <aiza21@comclark.com> Cc: "questions@freebsd.org" <questions@freebsd.org> Subject: Re: .sh and sed Message-ID: <AANLkTikoD1YkUoG0A8I98BnwLFwzuHzVr1-l5tZFXSqq@mail.gmail.com> In-Reply-To: <4C18B276.4080900@comclark.com> References: <4C18B276.4080900@comclark.com>
next in thread | previous in thread | raw e-mail | index | archive | help
You could always use basename for this. "basename /usr/local/bin/bash" will display "bash" On Wed, Jun 16, 2010 at 6:16 AM, Aiza <aiza21@comclark.com> wrote: > Trying to use sed to remove the path from the file name. > Variable has complete path plus the file name > /usr/local/etc/filename > Need variable containing only the file name. > Is the sed utility the best thing to use? > Is there some other utility better suited for this task. > How would sed by coded to do this? > > Thanks for your help in advance. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > -- - Simplicity is the ultimate sophistication. - Leonardo da Vinci - Intelligence is not defined by what you know, It's how you USE it. - People who hate Windows use Linux but people who love UNIX use BSD.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikoD1YkUoG0A8I98BnwLFwzuHzVr1-l5tZFXSqq>