From 77cfffee6177fb0421fa0fce15d6a1875bde4816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20W=C3=BChrer?= Date: Sat, 18 May 2024 21:04:34 +0200 Subject: manuals, sum-down, radix --- man/man1/strjoin.1 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 man/man1/strjoin.1 (limited to 'man/man1/strjoin.1') diff --git a/man/man1/strjoin.1 b/man/man1/strjoin.1 new file mode 100644 index 0000000..dd32f46 --- /dev/null +++ b/man/man1/strjoin.1 @@ -0,0 +1,40 @@ +.TH strjoin 1 2023-07-03 utils + +.SH NAME +strjoin \- join words with a word + +.SH SYNOPSIS +.B strjoin +.IR separator \ [ word\ ... ] + +.SH DESCRIPTION +.B strjoin +is the command line equivalent of +.BR python (1)'s +.B str.join(...) +and java (1)'s +.BR Stream.collect(Collectors.joining(...)) . +It is practically identical to +.B IFS=,;echo "$*" +in +.BR bash (1), +without having to set and reset the +.I IFS +variable. + +The first parameter is the separator +that goes between the words. +All other parameters are the words. +(They don't have to be single words, but they are treated as such.) + +This is useful for constructing paths, +like for example +.BR java (1) +classpaths for +.BR jar (1) +manifest files, +but also tab-separated value records, +and tons of other things. + +.SH EXAMPLES +.B strjoin , foo bar baz -- cgit v1.2.3