I need the line printed with echo to append to eof of to exactly line, am i able to do that?
i mean
echo "sysctl -w lalala=1" > to end of file /etc/sysctl.conf
or to the 21st line, if the line exist, open new line and insert text there.
Thx.maybe i'm in wrong topic but anyway...
to echo to the end of a file use the >> instead of >
echo "sysctl -w lalala=1" >> /etc/sysctl.conf
FYI if you want the output of that command to be put at the end of the file use a forward tick `` in place of the double quotes "".