I need to find first occurrence of "all.css" and insert content of my file below this occurrence. Code that I use in my bash-script:
FILE="$OLD_WEB_SOURCES/logon.html"
BLA="$DIR/first_insert_android"
sed '/all.css/ r $BLA' "$FILE" > TMP1
mv TMP1 "$FILE"
But this code doesnt work for me. BTW echo
of variables FILE and BLA shows correct path. Can someone explain what I'm doing wrong?
You need to use double quotes(
"
) to access the shell variable( $BLA ) insed
. Try this,