Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash cut delimiter multiple spaces

Just use cut command with delimiter flag 'd' as follows:
echo 'a1 a2 a3 a4 a5' | cut -d ' ' -f 1,4- 
a1 a4 a5	#outputs first and from 4th fields of given string
Comment

PREVIOUS NEXT
Code Example
Shell :: git stash save name 
Shell :: linux command to copy file 
Shell :: pdf file 30mb 
Shell :: copy files from windows to wsl2 ubuntu 
Shell :: get latitude and longitude based on user entered place android 
Shell :: clean linux 
Shell :: git get latest log output to file 
Shell :: write in a file linux 
Shell :: ubuntu create user 
Shell :: nginx on ubuntu 
Shell :: uninstall awesome window manager ubuntu 
Shell :: small size centos7 gui 
Shell :: permanent noh vim 
Shell :: uninstalling vscode for centos 8 
Shell :: uninstall en_web_core md 
Shell :: rvm not function rvm use 
Shell :: sshfs lxc 
Shell :: upgrade armbian 
Shell :: import database via power shell 
Shell :: deploying to heroku from git 
Shell :: linux exploit database search commad 
Shell :: batch rename files fish 
Shell :: add fold to path in linux 
Shell :: amazon ec2 gnome install yum 
Shell :: dmesg watch command linxu 
Shell :: push to a new remote branch 
Shell :: delphes install 
Shell :: bash script get value from piped input 
Shell :: clang format linux 
Shell :: arcmenu fix 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =