SyntaxFix
Write A Post
Hire A Developer
Questions
my two cents:
sed -i '1i /path/of/file.sh' filename
This will work even is the string containing forward slash "/"
"/"