Hello. I would like to strip out the process name from the ${0##*\} variable. So that if I have a script named "mytest.script" the variable would be populated with just "mytest" I have tried doing a substring but it doesnt seem to work.
name=`expr match "${0}" : './*\(/*.\)'`
Doing this gets me "m". I can do it in 2 steps. But I would like to accomplish in 1 if there is a way.
No I would like to use the ${0} variable to derive the name with out the extension. So if I had a script named thescript.script and i have a variable within the script:
name=${0##*/}
here i get "thescript.script"
however I want to get "thescript"