basename

NAME

basename - strip directories [and suffix] from filenames

SYNOPSIS

basename name [suffix]
basename {--help,--version}

DESCRIPTION

The basename command removes any leading directory components from name. If suffix is specified and is identical to the end of name, it is removed from name as well. basename prints the resulting name on the standard output.

OPTIONS

--help
Print a usage message on standard output and exit successfully.
--version
Print version information on standard output then exit successfully.

SEE ALSO

The opposite command is dirname. A more general alternative is echo NAME | {the -d and -f switches to cut}. Possibly combined with rev. Also, the POSIX shell spec, which Bash meets, can do this...
		:;get desuffix
		#!/.bi/bash
	
		for Arg in $@
		do
		        echo ${Arg%%\.*}
		done