1
0
Fork
You've already forked ordinal
0
  • Lex 60.2%
  • Roff 31.1%
  • Makefile 8.7%
Find a file
2024年02月24日 15:56:16 +01:00
.gitignore Genesis commit 2023年10月04日 21:41:42 +02:00
LICENSE Genesis commit 2023年10月04日 21:41:42 +02:00
main.l Simpliy implementation 2024年02月24日 15:56:16 +01:00
Makefile Compile lexer with -f 2023年10月04日 22:40:52 +02:00
ordinal.1 Fix typo in manual 2024年02月23日 15:42:06 +01:00
README.md Add a README 2023年10月04日 22:41:02 +02:00

ordinal

Ordinal is a command-line utility to convert cardinal numbers into ordinal ones. It’s functionality can be summed up nicely in the two following examples:

$ seq 20 | ordinal
1st
2nd
3rd
4th
5th
6th
7th
8th
9th
10th
11th
12th
13th
14th
15th
16th
17th
18th
19th
20th
$ date +'%-d of %B, %Y' | ordinal -p1
4th of October, 2023

For more details, read the ordinal(1) manual page.

Installation

Installation is very simple:

$ make
$ sudo make install

If you do not have flex installed, you probably have lex instead so you can try the following:

$ make LEX=lex LFLAGS= LDLIBS=-ll

If the above doesn’t work, send an email over to ~mango/public-inbox@lists.sr.ht describing your problem.