I am trying to print specific lines from a multi-line bash variable. I've found the following:
while read line; do echo LINE: "$line"; done <<< "$x"
where x would be the variable, but that simply prints out all lines instead of just a single one (say line 1 for instance). How could I go about adapting this to print out a specific line instead of all of them? (would like to avoid having to write the variable to a file instead)