Sample Header Ad - 728x90

sed with seq command problem

1 vote
1 answer
120 views
With this bash script
seq=$(seq 3)
sed -i "i ${seq}" input.txt
I get:
sed: -e expression #1, char 6: unknown command: `
'
But the following script works.
sed -i "i 1 2 3" input.txt
Why?
Asked by Tokubara (113 rep)
Jul 3, 2022, 08:41 AM
Last activity: Jul 3, 2022, 08:51 AM