Skip to content

sjmulder/unjoin

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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).