I am writing a script in ksh.
The user will input a string in the form: NAME_A. I want to strip off the '_A' part and use 'NAME' in later commands. I will also need to use the 'NAME_A' format, so I can't just have user enter 'NAME'.
'NAME' can be any number of characters, but '_A' will always be the last two characters. (It could be either '_A' or '_B').
Any hints as to how I can perform this surgery? Thanks!
John
The user will input a string in the form: NAME_A. I want to strip off the '_A' part and use 'NAME' in later commands. I will also need to use the 'NAME_A' format, so I can't just have user enter 'NAME'.
'NAME' can be any number of characters, but '_A' will always be the last two characters. (It could be either '_A' or '_B').
Any hints as to how I can perform this surgery? Thanks!
John