PLAY PODCASTS
'cut' - cut sections from lines of text - Video Man Pages

'cut' - cut sections from lines of text - Video Man Pages

DistroTube on Odysee

December 30, 20254m 42s

Audio is streamed directly from the publisher (player.odycdn.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.

Show Notes

thumbnail

The 'cut' command is used to cut sections from lines of text.

- Print the third character (-c) on each line:
cut -c 3 /path/to/file
command | cut -c 3

- Print characters 5-10 of each line of a file:
cut -c 5-10 path/to/file

- Split each line using a delimiter into fields, and print fields (-f) 2 and 5:
cut -f 2,5 path/to/file
NOTE The default delimiter is the TAB.

- Split each line using a specified delimiter (-d) and print field 4 and all fields after:
cut -d ":" -f 4- /etc/passwd
NOTE The /etc/passwd file uses colons to separate fields of information.

- Split each line using a specified delimiter (-d) and print field 4 and all fields previous:
cut -d ":" -f -4 /etc/passwd

- Do not print lines that do not contain the delimiter (-s):
cut -d " " -f -4 -s .bashrc

REFERENCED:
โ–บ https://gitlab.com/dwt1/vidman

WANT TO SUPPORT THE CHANNEL?
๐Ÿ’ฐ Patreon: https://www.patreon.com/distrotube
๐Ÿ’ณ Paypal: https://www.paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
๐Ÿ›๏ธ Amazon: https://amzn.to/2RotFFi
๐Ÿ‘• Teespring: https://teespring.com/stores/distrotube

DT ON THE WEB:
๐Ÿ•ธ๏ธ Website: http://distro.tube
๐Ÿ“ GitLab: https://gitlab.com/dwt1
๐Ÿ—จ๏ธ Mastodon: https://fosstodon.org/@distrotube
๐Ÿ‘ซ Reddit: https://www.reddit.com/r/DistroTube/
๐Ÿ“ฝ๏ธ Odysee: https://odysee.com/@DistroTube:2

FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
๐ŸŒ Brave Browser - https://brave.com/
๐Ÿ“ฝ๏ธ Open Broadcaster Software: https://obsproject.com/
๐ŸŽฌ Kdenlive: https://kdenlive.org
๐ŸŽจ GIMP: https://www.gimp.org/
๐Ÿ’ป VirtualBox: https://www.virtualbox.org/
๐Ÿ—’๏ธ Doom Emacs: https://github.com/hlissner/doom-emacs

Your support is very much appreciated. Thanks, guys!
...
https://www.youtube.com/watch?v=9hoTL0GP2uQ