I have a script that gathers data and will add it to a text file, without overwriting the current text.
I can't quite get it to work properly.
I've tried printing directly, but all this does is overwrite the existing text.
where $output is my text and disk_space.txt is my text file.
I've also tried using VI to edit the file, but I can't get that working either.
I can't quite get it to work properly.
I've tried printing directly, but all this does is overwrite the existing text.
Code:
echo $output >> disk_space.txt
where $output is my text and disk_space.txt is my text file.
I've also tried using VI to edit the file, but I can't get that working either.
Code:
vi $file <<EOF
:$
$
o
$output
ESC
:w
:x
EOF