Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

add line at beginning of file unix

sed -i '1s/^/your text
/' file #Note the addition of the "
" for concluding the new line after the insertion
 
PREVIOUS NEXT
Tagged: #add #line #beginning #file #unix
ADD COMMENT
Topic
Name
6+9 =