El Wed, Mar 22, 2000 a las 06:34:39PM +0100, Santi dijo: > > > Buena memoria. Con ESC[2J la pantalla se limpia, pero el texto comienza > a escribirse abajo de todo :-( > > Sabes donde puedo echarle un vistazo a los codigos ansi? Espero que no se molesten por la longitud de este correo. Tambien espero que sea de utilidad... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ANSI ESCAPE SEQUENCES =============================================================================== Wherever you see '#', that should be replaced by the appropriate number. ESC code sequence Function ------------------- --------------------------- Cursor Controls: ESC[#;#H or ESC[#;#f Moves cusor to line #, column # ESC[#A Moves cursor up # lines ESC[#B Moves cursor down # lines ESC[#C Moves cursor forward # spaces ESC[#D Moves cursor back # spaces ESC[#;#R Reports current cursor line & column ESC[s Saves cursor position for recall later ESC[u Return to saved cursor position Erase Functions: ESC[2J Clear screen and home cursor ESC[K Clear to end of line Set Graphics Rendition: ESC[#;#;....;#m Set display attributes where # is 0 for normal display 1 for bold on 4 underline (mono only) 5 blink on 7 reverse video on 8 nondisplayed (invisible) 30 black foreground 31 red foreground 32 green foreground 33 yellow foreground 34 blue foreground 35 magenta foreground 36 cyan foreground 37 white foreground 40 black background 41 red background 42 green background 43 yellow background 44 blue background 45 magenta background 46 cyan background 47 white background ESC[=#;7h or Put screen in indicated mode where # is ESC[=h or 0 for 40 x 25 black & white ESC[=0h or 1 for 40 x 25 color ESC[?7h 2 for 80 x 25 b&w 3 for 80 x 25 color 4 for 320 x 200 color graphics 5 for 320 x 200 b & w graphics 6 for 640 x 200 b & w graphics 7 to wrap at end of line ESC[=#;7l or ESC[=l or Resets mode # set with above command ESC[=0l or ESC[?7l Keyboard Reassignments: ESC[#;#;...p Keyboard reassignment. The first ASCII or ESC["string"p code defines which code is to be or ESC[#;"string";#; changed. The remaining codes define #;"string";#p what it is to be changed to. E.g. Reassign the Q and q keys to the A and a keys (and vice versa). ESC [65;81p A becomes Q ESC [97;113p a becomes q ESC [81;65p Q becomes A ESC [113;97p q becomes a E.g. Reassign the F10 key to a DIR command. ESC [0;68;"dir";13p The 0;68 is the extended ASCII code for the F10 key and 13 is the ASCII code for a carriage return. Other function key codes F1=59,F2=60,F3=61,F4=62,F5=63 F6=64,F7=65,F8=66,F9=67,F10=68 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > From: "Pookie" <pookie@menta.net> > Subject: Re: Puede alguien pasarme su fichero /etc/issue? > > es un archivo con codigos ansi, asi que si no me acuerdo mal es ESC[2J > > ----- Original Message ----- > From: "Santi" <fasanti@usc.es> > To: <debian-user-spanish@lists.debian.org> > Subject: Puede alguien pasarme su fichero /etc/issue? > > > > > > Que tal? > > > > Que caracter de control hay que poner al inicio de /etc/issue para que > > la pantalla se borre (como con clear) cada vez que se inicia una nueva > > sesion en consola? Ya he probado ctrl+l. No funciona. Si no lo tienes, create un fichero llamado '.bash_logout' en tu home. Dentro pon lo que quieres que se ejecute al salir de la shell. Yo antes tenía un simple clear, en mi propio home, pero antes de escribir estas lineas he hecho un locate '.bash_logout' y he encontrado uno en '/etc/skel/.bash_logout' que yo no había puesto. Su contenido es este: ~~~~~==> /etc/skel/.bash_logout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~/.bash_logout: executed by bash(1) when login shell exits. # when leaving the console clear the screen to increase privacy case "`tty`" in /dev/tty[0-9]) clear esac ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Como ves, lo que hace es simplemente borrar la pantalla, dejandotela lista para la siguiente sesión. Espero que sea esto lo que buscas :) -- =============================8<========================================= ___ _ _ / ___|_ _| (_) ___ Grupo de Usuarios de LInux de Canarias | | _| | | | | |/ __| Pasate por nuestro web.... | |_| | |_| | | | (__ http://www.gulic.org/ \____|\__,_|_|_|\___| Clave GPG en las paginas de Gulic Key fingerprint = F734 17F5 3AB6 E1F6 11C4 B498 5B3E 1111 FEDF 90DF =============================================================>8=========
Attachment:
pgpbUxOkdGNal.pgp
Description: PGP signature