I am fairly new to sed and am trying to use sed to insert a user inputed line as the first line in another text file. The shell script I am try to use is:
echo -n "Enter values: "
read text
echo "You entered: $text"
sed -i '1i $text' $file
The return I get is:
"sed: -i may not be used with stdin"