_ _ ___ | |__ __ _ _______ | |_ / _ \| '_ \ / _` |_ / _ \| __| | (_) | | | | (_| |/ / (_) | |_ \___/|_| |_|\__,_/___\___/ \__|
ohazot | | docs | | about |
cut
— split
strings
OPTIONS
-d | | delimeter |
-c | | split by character count |
-d | | split by character (specify delimeter) |
-f | | specify field count. Use n,-n,n-
-f 2, gets 2nd field; -f -2, gets up to the 2nd
field; -f 2-, gets from the 2nd field to the end
|
$ echo "a b c" | cut -d " " -f 2 b $ echo "a b c" | cut -d " " -f 2- b c $ echo hello | cut -c 2 e
SEE ALSO
OpenBSD manpages
files
<cut.oh>