In Bash, I want to get the Nth word of a string hold by a variable.
For instance:
STRING="one two three four" N=3
Result:
"three"
What Bash command/script could do this?
echo $STRING | cut -d " " -f $N
1.4m articles
1.4m replys
5 comments
57.0k users