Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2005 12:19:57 -0700 (PDT)
From:      Philip Hallstrom <freebsd@philip.pjkh.com>
To:        Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
Cc:        Brian Henning <brian.henning@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: OT: Shell script
Message-ID:  <20050711121921.O85191@wolf.pjkh.com>
In-Reply-To: <44irzhp3fj.fsf@be-well.ilk.org>
References:  <1f75ab0e050711113657ba7057@mail.gmail.com> <44irzhp3fj.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>> I am trying to write an SH script that i need some functionality.
>>
>> I want it to be able to get a filename without the extention on the end.
>>
>> for example.
>>
>> file.mp3
>>
>> i would like it to return 'file'.
>
> basename(1); it's even POSIX, so it's pretty portable.

But only if he knows the file extension before hand...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050711121921.O85191>