/unjoin

Split input on separators.

Primary LanguageCBSD 2-Clause "Simplified" LicenseBSD-2-Clause

unjoin

Build status

Split input on separators.

unjoin separator ...

funjoin [-f prefix] [-n number] separator ...

Description

unjoin copies standard input to standard output, replacing occurences of any separator with a newline character.

funjoin splits standard input, separated by any separator, into files named "xx" (or another prefix) and two (or number) decimal digits.

Examples

Split on underscores and double colons:

$ echo "one::two_three" | unjoin _ ::
one
two
three

The same, but outputing to separate files rather than separate lines:

$ echo "one::two_three" | funjoin _ ::
$ cat xx01
two

Building

Unix-likes:

make

# tweak Makefile to taste
make install
make uninstall

See also

sed(1).

Authors

Sijmen J. Mulder (ik@sjmulder.nl). Options output file naming copied from OpenBSD csplit(1).