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
On Mon, Sep 19, 2016 at 7:23 PM, Dhanasekar <tkdhanasekar@xxxxxxxxx> wrote:
Hi,
basename - strip directory and suffix from filenames
$ basename /etc/apache2/
$ basename /etc/apache2/apache2.conf
$ basename perlscript script
$ basename /etc/group
$ basename /etc/passwd
regards,
T.Dhanasekar
_____________________________________
ILUGC List: //www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/