Horje
add line at beginning of file unix Code Example
add line at beginning of file unix
sed -i '1s/^/your text\n/' file #Note the addition of the "\n" for concluding the new line after the insertion
add line to beginning of file shell script
$ sed -i '1s/^/added text /' file




Shell

Related
sed print from match to end of file Code Example sed print from match to end of file Code Example
linux set environment Code Example linux set environment Code Example
gitlab ci exclude branch Code Example gitlab ci exclude branch Code Example
grep print all after Code Example grep print all after Code Example
ubuntu service start example Code Example ubuntu service start example Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9