Emulating :r and :e within a /bin/sh script
I'd like to write the following kind of script in sh, using the expression :r from tcsh.
#!/bin/sh
file = ${1}:r
This would convert an argument with an extension to just the root of the extension.
But sh doesn't support :r, :e, etc. Is there another way to accomplish this/
Thanks very much for your help
|