jeudi 26 mars 2015

How to print file content *and delete printed content* from file?


In Linux bash shell, How can I print file content and delete printed content from file?


I have a program writing texts to a file repeatedly. On a Linux shell prompt, I want to print the contents of the file and then delete printed contents from the file repeatedly, to make my file size small enough.


Do we have bash command lines or combinations to do that?



1 commentaire: