0

How insert variable inside quotes in this script?

f=`sed -n '1p' < /path/ls.txt`

I try something like this but it don't work..

f=`sed -n '"$i1"p' < /path/ls.txt`
mechmati
  • 21
  • 3
  • No, i try adivce from this post and it not help me. I want incrase variable `$i` to take {1, 2, .. x} line from .txt file – mechmati Jul 14 '21 at 08:53
  • You *didn't* try the solution from there, you tried something else. Compare your usage of quotes with that in the answer there. – muru Jul 14 '21 at 08:54
  • `sed -n "$i"'p' < /raid/path/ls.txt` now it work, thanks! – mechmati Jul 14 '21 at 09:48

0 Answers0