#This sedscript, named roman.sed, converts Roman numerals to Arabic #numerals. Each line of input contains one lowercase Roman numeral. #The output can be fed directly to the calculator program bc. For #example, ccxxxi becomes 100+100+10+10+10+1. s/i/+1/g s/v/+5/ s/x/+10/g s/l/+50/ s/c/+100/g s/d/+500/ s/m/+1000/g #bc will not accept a plus at the start of a line. s/^+//