Posted By

whitetiger on 11/09/06


Tagged

Shell Bash clear dir rails unix c windows linux files cli ssh sessions cls


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

copyleft
jeffhung
vkolev


C - clear screen


 / Published in: C++
 

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. // Funziona sui terminali compatibili ansi
  7.  
  8. fprintf(stdout, "\033[2J"); // Cancella lo schermo
  9. fprintf(stdout, "\033[1;1H"); // Posiziona il cursore sulla linea colonna 1
  10.  
  11. return EXIT_SUCCESS;
  12. }

Report this snippet  

You need to login to post a comment.