Question about partial searching

Try putting an 'echo something' in the loop to see if the loop's running at all.

Too many <<< after grep when one or none would do? Or is that a bash-ism?

It's a "here string" (one-liner "here document"-style thing). A bash- / ksh93-ism

Maybe there are funny lines in the playlist?

If you really want to know who is doing what, there is truss -fae ! Faster than debug statements, and educational.

---------- Post updated at 03:47 PM ---------- Previous update was at 03:09 PM ----------

Seems kinda wild for this simple sed/shell, but it was a bash challenge. I think someone was a byte short, or did the req creep? This has a stdout free of prompts and such, but is sed metachar sensitive. One might use sed/cut to trim the key field out, grep to find interesting line numbers, and then pull the lines from the original.

echo 'Enter name to search: \c' >/dev/tty
read n
sed '
  h
  s/^.\{11\}\(.\{15\}\).*/\1/
  /'"$n"'/{
    g
    p
   }
  d
 ' playerlist