Quote:
He states quite clearly:

Quote:
I want to check that the penultimate char is a period



Oh.. dictionary out.. second last character.

Okay, so what he was doing originally should work, so long as his script ensures there are always at least two characters in the string.
Code:

junk=" $@"
[ "${junk:0-2:1}" = "." ] || echo no



Edited by mlord (17/03/2005 14:45)