substr Code
Brought to you by:
su8
| File | Date | Author | Commit |
|---|---|---|---|
| regress | 2018-01-03 |
|
[8a99e7] regress: don't hide result from Makefile |
| .gitignore | 2014-07-30 |
|
[371744] Update .gitignore |
| Makefile | 2017-04-19 |
|
[2cb652] Use a more portable Makefile. |
| README.md | 2018-01-03 |
|
[e4527b] README: indicate how to compile and install |
| substr.1 | 2014-07-30 |
|
[343339] Add a COMPATIBILITY section |
| substr.c | 2017-04-19 |
|
[2cb652] Use a more portable Makefile. |
An utility to extract substring from a string, inspired by the GNU
expr extension of the same name. This implementation is under
the ISC licence.
Read the man page for more information with either mandoc(1) or groff(1):
$ mandoc substr.1 | less
$ groff -m mdoc -Tascii substr.1 | less
In order to run on Linux systems the libbsd package should be installed first.
On OpenBSD:
$ make && doas make install
On Linux:
$ LDADD=-lbsd CFLAGS="-D NEED_LIBBSD" make && sudo make install
$ substr hello 1 2
he
$ substr "Omelette du fromage" 13 7
fromage
$ substr toto 2
oto