bash add text to file
echo "hello world" >> my_file.txt
bash add text to file
echo "hello world" >> my_file.txt
add lines to a file bash
how to add lines inside a file
sed -i -e "50r../../../../folder1/lines_to_add.txt" a.txt
a.txt - the file you want to change.
50r is line number of a.txt
some lines are inside lines_to_add.txt file
../../../../folder/lines_to_add.txt
-i update a.txt, try without -i before runthe code,
be carefull with "newlines",
"keep a newline at the end of lines_to_add.txt"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us