[ILUGC] Re: GNU/Linux commands - basename

  • From: Arun Khan <knura9@xxxxxxxxx>
  • To: ILUG-Chennai <ilugc@xxxxxxxxxxxxx>
  • Date: Wed, 21 Sep 2016 12:29:13 +0400

On Tue, Sep 20, 2016 at 9:40 AM, Balasubramaniam Natarajan
<bala150985@xxxxxxxxx> wrote:

Good one, Dhanasekar to remove suffix we need to give what needs to be
removed like so.
$ touch bala.txt
$ echo "Hello" > bala.txt
$ basename /tmp/bala.txt
bala.txt
$ basename /tmp/bala.txt txt
bala.
$ basename /tmp/bala.txt .txt
bala

Good examples clarifying the suffix removal.  The OP lacked this.

<sidebar>
You are a seasoned contributor to this list and used to follow the
posting guidelines like not top posting.
</sidebar>

-- Arun Khan
_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: