want to add a string in a very top of a file without using VI or SED or AWK
this is what ive done:
(echo '0a'; echo 'LINE OF TEXT'; echo '.'; echo 'wq') | ed -s myfile
to add astrng right in the middle i could have count the lines of the file and just chenge the address.
EG. if file has 6 lines of text:
(echo '3a'; etc...etc...etc...)
Is there a method to do it where i do not need to know how many lines has a file, the script would add it straight in the middle?