Reply to topic  [ 5 posts ] 
Who said the command line wasn't fun? 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
*****************************************************************************************************************************
NOTE: The following does not use any harmful commands, if in doubt, use the `man` command to view what a command does like this:
man echo
*****************************************************************************************************************************

Who said using the command line was boring, difficult and has no place in computing today? It comes in very handy when you're bored!

Using your favorite plain text editor (Kate, gEdit, Vi(m), Emacs), copy and paste the following into it:
Code:
#!/bin/bash
# Hacked together by Ben Lavery
# 15th June 2009
# b   l   r   m   .       \   X   /
#  e . a e y g a l c m     \ / \ /
#   n   v   @   i   o       V   V

LINE=`resize | grep -i line | grep -iv colu |sed 's/[a-zA-Z]//g' | sed 's/\(=\)\(.*\)\(;\)/\2/'`

clear(){
   for i in $($LINE)
        do
                echo
        done
}

wave(){
   echo "    o/" && echo "   .|" && echo "   / \\"
   sleep 1
   clear   

   echo "    o|" && echo "   .|" && echo "   / \\"
   sleep 1
   clear
}


clear

while :
do
   #echo "    o/" && echo "   .|" && echo "   / \\"
   #sleep 1
   #clear   

   wave
   wave
   wave

   echo "    o" && echo "   .|\\" && echo "   / \\"
   sleep 1
   clear
   
   echo "     o" && echo "     |" && echo "     |"
   sleep 1
   clear
   
   echo "      o" && echo "     /|." && echo "     / \\"
   sleep 1
   clear
   
   echo "       o"  && echo "       |" && echo "       |"
   sleep 1
   clear
   
   echo "        o" && echo "       .|\\" && echo "       / \\"
   sleep 1
   clear
   
   echo "        o" && echo "       .|\\" && echo "       / \\"
   sleep 1
   clear
   
   echo "        o" && echo "       /|." && echo "       / \\"
   sleep 1
   clear
   
   echo "       o" && echo "       |" && echo "       |"
   sleep 1
   clear
   
   echo "      o" && echo "     /|." && echo "     / \\"
   sleep 1
   clear
   
   echo "     o" && echo "     |" && echo "     |"
   sleep 1
   clear
   
   echo "    o"  && echo "   .|\\" && echo "   / \\"
   sleep 1
   clear
   
done


Save it as ta-da.sh on your desktop

Open up Terminal/Term/xterm/etc and perform the following operation on it:
cd $HOME/Desktop
chmod 555 ta-da.sh
./ta-da.sh

Use ctrl+c to exit the script.

Enjoy :P 8-)


Last edited by forquare1 on Mon Jun 15, 2009 8:07 pm, edited 1 time in total.



Mon Jun 15, 2009 4:10 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 5288
Location: ln -s /London ~
Reply with quote
You want to use jot instead of seq on OS X, or write your own version of seq. And possibly explain that Ctrl+c should be use to exit it, for those not aware of how to use bash.

Edd

_________________
timark_uk wrote:
Gay sex is better than no sex

timark_uk wrote:
Edward Armitage is Awesome. Yes, that's right. Awesome with a A.


Mon Jun 15, 2009 7:31 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
EddArmitage wrote:
You want to use jot instead of seq on OS X, or write your own version of seq. And possibly explain that Ctrl+c should be use to exit it, for those not aware of how to use bash.

Edd


Ah, good point, sorry, I hadn't tested it on other systems, was just a bit or geeky fun during lunch...
I must admit I thought most people would close the window...


Mon Jun 15, 2009 7:56 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 5288
Location: ln -s /London ~
Reply with quote
forquare1 wrote:
I must admit I thought most people would close the window...

Oh yes. I'm just used to always having a Terminal.app window open somewhere at all times!

Edd

_________________
timark_uk wrote:
Gay sex is better than no sex

timark_uk wrote:
Edward Armitage is Awesome. Yes, that's right. Awesome with a A.


Mon Jun 15, 2009 7:57 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
EddArmitage wrote:
forquare1 wrote:
I must admit I thought most people would close the window...

Oh yes. I'm just used to always having a Terminal.app window open somewhere at all times!

Edd


Amendments made, if anyone is having problems with the `resize` command, please use a different application, it's part of the X11 spec, or something...
And added the note about ctrl+c :)

Edd, Terminal is usually open at home, and I frequently hit the limit at work, most are unused, but I don;t clear up after myself, and 8 workspaces * 3 monitors...I can get quite a few!


Mon Jun 15, 2009 8:10 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.