How to split a line into a tab in bash
test1="one two three four five"
echo $test1 | cut -d $'\t' -f2
I have a string split by TAB
and I want to get the second word with a command cut
.
I found the question How to split a string in bash with a tab delimiter . But the solution is not used with cut
.
+3
source to share