Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux cut

cut // remove sections from each line of files
echo foo bar baz | cut -f 2 -d ' '
bar
Comment

linux cut

# -c: cut string (e.g. cut from 1 to 10 chars)
cut -c 1-10 /etc/passwd

# -d SYMBOL set a SYMBOL be delimiter
# -f then -f show seperate part (e.g.  1,2,3,7,8  1-3,7-8)
cut -d : -f 1-2,4 /etc/passwd

# --complement exclude cut setting
cut -d : -f 1-2,4 --complement /etc/passwd
Comment

PREVIOUS NEXT
Code Example
Shell :: create group in linux command example 
Shell :: learn prisma 
Shell :: ubuntu activate network interface on boot 
Shell :: Custom Bash Shell 
Shell :: Automatically run program on Linux startup via systemd 
Shell :: change commit message git 
Shell :: how to install deepin desktop environment on ubuntu 20.10 
Shell :: git get back to most recent commit 
Shell :: change resolution of a video 
Shell :: linux make home dir 
Shell :: how to install spotify in ubuntu 
Shell :: ionic capacitor run ios 
Shell :: bash get public ip 
Shell :: my ip 
Shell :: anaconda install for kali linus 
Shell :: git delete commit from history 
Shell :: npm install webpack server 
Shell :: enviroment variables in firebase 
Shell :: materila ui 
Shell :: Push your branch up to the remote. 
Shell :: git merge tag to branch and squash commits 
Shell :: bash append to a file 
Shell :: wget 
Shell :: git newly created branch not showing 
Shell :: ionic 
Shell :: git clone does not show all branches 
Shell :: install fm migrate 
Shell :: ubuntu upgrade libstdc++ 
Shell :: dockerfile from local image 
Shell :: install pillow error alpine linux 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =