Hello,
I'm working on a simple korn shell script to combine a couple of variables and insert a period '.' between the characters in one of the variables.
Example of what i want in my script:
SN=1234567
I want to create a variable valued as 1234.567
SN1=`${SN:0:4}`
which I thought would set SN1 to 1234
SN2=`${SN:4}`
which I thought would set SN1 to 567
but these do not work as I get"the specified substition is not valid for this command".
Thanks for your help. I'm tired of guessing at this.
I'm working on a simple korn shell script to combine a couple of variables and insert a period '.' between the characters in one of the variables.
Example of what i want in my script:
SN=1234567
I want to create a variable valued as 1234.567
SN1=`${SN:0:4}`
which I thought would set SN1 to 1234
SN2=`${SN:4}`
which I thought would set SN1 to 567
but these do not work as I get"the specified substition is not valid for this command".
Thanks for your help. I'm tired of guessing at this.