I want to extract ids from a text file and build a string for a curl request I tried this
#!/bin/bash
for ids in `cat numbers.txt`
do
echo "hi/$ids/oo"
done
echo "ALL DONE"
But this gives me the wrong output. It prints
/oo12341
/oo56z49
/oo60272347
/oo2347
/oo12312356
hi/124556616/oo
ALL DONE
instead of:
hi/12341/oo
hi/56z49/oo
hi/60272347/oo
hi/2347/oo
hi/12312356/oo
hi/124556616/oo