[CLUG-tech] how to replace in batch commands

Jeremy Thurgood jerith at jerith.za.net
Wed Mar 28 15:33:41 SAST 2007

Rainer M. Krug wrote:
> My question: how can I cut the last four characters off $i to obtain 
> only the file name (e.g. test from test.shp)?

This looks like a job for basename:
basename $i .shp

See the man page for details.


More information about the clug-tech mailing list