Yo.

Bee-boop-beep. It was nice meeting you? Maybe?
It's tempting, but don't do it. →
You know what I'm talkin' about. That link, tempting. Ino.

Nov

18

Mother’s day Bash Script

I haven’t really posted any recent code up here in a very, very long time…so I figured I’d post the little bash script I wrote for my mom last year for mother’s day.

#!/bin/sh
#A script written by Shane Owens For his Mom
#Based of Script written by Justin Kelz
echo -n “Who are you!?
:”
read name
while [ -z $name ]
do
echo -n “Please enter your name, MOM!
:”
read name
done
echo -n “Who’s the King of the World?
:”
read king
while [ -z $king ]
do
echo -n “Psst, you know it’s Shane; just type it in!
:”
read king
done
while [ : ]
do
clear
cat << MENU
!!HAPPY MOTHERS DAY!!
>>>>>>>   <<<<<<<
“Yo, Yo, Yo $name!”
Here are your choices.
T: Says who’s the best mom ever!
R: Says their birthday!
A: Says who loves them!
C: Says who is their most faaaaaavorite son!
Y: Quit this script.
MENU
echo -n ‘Please state your choice from above:’
read ans
while [ -z $ans ]
do
echo -n “Please give a valid response!
:”
read ans
done
case $ans in
T|t) echo -n Tracy N. OWENS! =D
read :
;;
R|r) echo -n The First of May!
read :
;;
A|a) echo -n Everybody $name knows loves them! What are you talking about!?! But mostly Shane Owens!
read :
;;
C|c) echo -n Def, Shane is the best son ever! :D
read :
;;
Y|y| exit|quit|Quit|Exit|end|End) echo “See you next time $name!!”
break
;;
*)   echo -n “Um..that’s not even a choice!! Lol
:”
sleep 2
;;
esac
done

#!/bin/sh

#A script written by Shane Owens For his Mom

echo -n “Who are you!?

:”

read name

while [ -z $name ]

do

echo -n “Please enter your name, MOM!

:”

read name

done

echo -n “Who’s the King of the World?

:”

read king

while [ -z $king ]

do

echo -n “Psst, you know it’s Shane; just type it in!

:”

read king

done

while [ : ]

do

clear

cat << MENU

!!HAPPY MOTHERS DAY!!

>>>>>>>   <<<<<<<

“Yo, Yo, Yo $name!”

Here are your choices.

T: Says who’s the best mom ever!

R: Says their birthday month!

A: Says who loves them!

C: Says who is their most faaaaaavorite son!

Y: Quit this script.

MENU

echo -n ‘Please state your choice from above:’

read ans

while [ -z $ans ]

do

echo -n “Please give a valid response!

:”

read ans

done

case $ans in

T|t) echo -n Tracy Owens! =D

read :

;;

R|r) echo -n Oh come on, you know this..May, silly.

read :

;;

A|a) echo -n Everybody $name knows loves them! What are you talking about!?! But mostly Shane!

read :

;;

C|c) echo -n Def, Shane is the best son ever! :D

read :

;;

Y|y| exit|quit|Quit|Exit|end|End) echo “See you next time $name!!”

break

;;

*)   echo -n “Um..that’s not even a choice!! Lol

:”

sleep 2

;;

esac

done

So, I had some giggle farts last year and just wanted to share them with you all. :3

Category: Uncategorized | Leave a Comment
Tags:

Aug

1

Wave Test

Just testing out a “Google Wave” plugin test, I realize anyone without a wave-sandbox account can’t see this. But if you can. It’s very, very neat. If you do have a developer account from the WaveSandBox, you should check out this neat wordpress app. Located here. Well, anywho. Here’s the test, if you can see it tell me what ya’ think.

Category: Google Wave, Wordpress, Wordpress Plugins | Leave a Comment
Tags:

Jul

6

Pidgin Logcatcher

The other day I was wondering how many times I’ve said a certain word in my pidgin logs, so I opened up a terminal and started playing with cat and grep. I eventually found out that I could just do ” cat /home/username/.purple/logs/*/*/*/* | grep ‘word’ -ic ” After playing with that a few times.

mangospork@Carter ~ $ cat /home/mangospork/.purple/logs/*/*/*/* | grep ‘lol’ -ic
42308

I got lazy, and thought it’d be cool to write some form of bash script to do it all for me. Using cat and grep, I came up with this.

#!/bin/sh
#A Script written by Shane Owens
#Purpose: To see how many times you’ve said a certain word in pidgin logs.
echo -n “Hello. What is your name?
>”
read name
while [ -z $name ];
do
echo -n “C’mon just enter it!
>”
done
while :;
do
{
echo -n “What word would you like to search $name?
>”
read word

cat ~/.purple/logs/*/*/*/* | grep “$word” -ic
sleep 2
clear
}
done

It was a really simple concept, and turned out to be pretty fun outcome. Heh. If you’d like a direct link to download it, download it here.

Oh right, almost forgot about installation!

  1. Copy + paste the script to whateveryouwant.sh, with your text editor.
  2. As your root user, cd to the directory you placed it. (Ex. cd /home/mangospork/blah/ ) then chmod u+x thefilename.sh (Ex. chmod u+x blah.sh)
  3. Then as your standard user, just cd to the directory and type ./whateveryoucalledit.sh (Ex. ./blah.sh)

Oh and I’ve said ‘lol’ 42308 times, ‘fail’ 848 times, ‘lmao’ 755 times, and ‘heh’ 2104 times.

Category: Bash, Convenience, LibPurple, Linux, Pidgin, Scripts | 3 Comments
Tags:

    Aboot me!

    Welcome to my website. I'm a programmer, student, and security enthusiast. I love Linux, and treating computer building like arts and craft projects. I try to stay healthy, but in the end of the day I always seek caffeine. Oh yes, and I'm 16 years of age.

    Nonsense