Answers for "trim each line bash last character"

3

bash remove last character from string

country="portugal"
modified=${country::-3}

echo $modified

Output:
	"portu"
Posted by: Guest on October-04-2021
0

bash cut delimiter last field

echo 'maps.google.com' | rev | cut -d'.' -f 1 | rev
Posted by: Guest on May-03-2020

Code answers related to "trim each line bash last character"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language