tuc
Cut text (or bytes) where a delimiter matches, then keep the desired parts. A more user-friendly and powerful version of
cutwith sensible defaults. More information: https://github.com/riquito/tuc#help.
- Cut and rearrange fields:
echo "foo bar baz" | tuc ''
- Replace the delimiter
spacewith an arrow:
echo "foo bar baz" | tuc ' ' ' ➡ '
- Keep a range of fields:
echo "foo bar baz" | tuc ' '
- Cut using
regex:
echo "a,b, c" | tuc ''
- Emit JSON output:
echo "foo bar baz" | tuc '' --json
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
