I have a string that i am want to remove punctuation from.
I started with
sed \'s/[[:punct:]]/ /g\'
But i had problems on HP-UX n
You need to place the brackets early in the expression:
sed 's/[][=+...-]/ /g'
By placing the ']' as the first character immediately after the opening bracket, it is interpreted as a member of the character set rather than a closing bracket. Placing a '[' anywhere inside the brackets makes it a member of the set.
For this particular character set, you also need to deal with -
specially, since you are not trying to build a range of characters between [
and =
. So put the -
at the end of the class.