Trim rightmost character from text file. E.g. Fortran card sequence

Old Fortran programs may have columns 73-80 filled with card sequence numbers, completely vestigial since floppy disks.

cat ancient.for | cut -c-72 > ancient.f

This also gets rid of the trailing whitespace

Leave a Comment