Thursday, May 29, 2014

Bully your colleague in UNIX shell

Hi Folks,

Most of the Production Support Engineers will be having their Databases on Unix server.

In those cases most of the time you folks will be using Unix Shells. Then here is a small Unix command to make fun of the colleague who is logged in the same Unix Shell.

write is the unix command which helps to write messages to other person terminal.

syntax:

write username [ttyname]

Examples:

Simple:

banner  server crashed | write joel pts/4

More realistic:

(
 echo "\n\n ------------------------SERVER REBOOT INITIATED-----------------------"
 echo " completed   8% .."
 sleep 2
 echo " completed  24% .."
 sleep 3
 echo " completed  32% .."
 sleep 4
 echo " completed  90% .."
 sleep 2
 echo " completed 100% .."
 echo "\n\n ------------------------SERVER REBOOT COMPLETED-------------------------"
 echo "\nPlease press enter to Exit session..."
 ) | write agtmgt pts/13

Note: Make fun when your colleague is deeply investigation. Yeah, thats real fun folks..