5 ms·
Or you just pipe through the program of your choice for which you know the syntax: echo "foo bar fnord" | cut --delimiter " " --output-delimiter ":" -f1-
by jlg23 6y ago
Or you just pipe through the program of your choice for which you know the syntax:
echo "foo bar fnord" | cut --delimiter " " --output-delimiter ":" -f1-
# foo:bar:fnord
- bloopernova 6y agoI love learning new things about commands I've used for years. --output-delimiter ":" Very cool! However it does require the GNU version of cut, not the Mac OS X supplied BSD version. In zsh at least, you can do: alias cut='/usr/local/bin/gcut'