BSoD for linux/unix/console

Publicado: junio 7, 2010 en fast-tip, humor, Personal, script
Etiquetas:, , ,

I do not remember where I got this, but it is fun. I will put it in the motd of my hosts on April Fools’ day.

This script will display on a console a windows like BSoD (Blue Script of Day):

                                    Linux ws         An exception 0E has occurred at 0028:C0018DBA in VxD IFSMGR(01) +        0000340A.  This was called from 0028:C0034118 in VxD NDIS(01) +        00000D7C.  It may be possible to continue normally.         *  Press any key to attempt to continue        *  Press CTRL+ALT+DEL to restart your computer. You will           lose any unsaved information in all applications                             Press Any key to continue.

The original script used the ESC (033 in octal) character directly. I use ‘@’ that I replace for ESC so it is more readable and easy to handle.

#!/bin/sh
cat << EOM | tr '@' '\033'
@[0m@[2J@[1;1H@[0;25;37;44m
EOM
clear
cat << EOM | tr '@' '\033'

                                   @[34;47m Linux @[44mws@[37m

@[1m       An exception 0E has occurred at 0028:C0018DBA in VxD IFSMGR(01) +
       0000340A.  This was called from 0028:C0034118 in VxD NDIS(01) +
       00000D7C.  It may be possible to continue normally.

       *  Press any key to attempt to continue
       *  Press CTRL+ALT+DEL to restart your computer. You will
          lose any unsaved information in all applications

                           Press Any key to continue.

                                                                                @[0m
EOM
read

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s