RosettaCodeData/Task/Nth/Sed/nth.sed

2 lines
53 B
Sed

/1.$/!{s/1$/1st/;s/2$/2nd/;s/3$/3rd/;};s/[0-9]$/&th/