Go White Ninja!
-Work it
Saturday, July 23, 2005
Friday, July 22, 2005
bash scripting
Write a bash script and use it from any directory
I wrote up a simple bash script that automates creating a .java file template the way I like my java programs laid out. What I wanted to do was be able to use this bash script from any directory. From my /home/username directory I had created another directory /home/username/scripts that is intended to house any scripts I write up.
It is simple enough to write a bash script and access it from any directory via
> bash /home/username/scripts/theScript args
but I wanted something simpler. Something like
> theScript args
And here's how it's done. You have written a script (theScript) and placed it in your /home/username/scripts directory. Now change the permission of the script
> chmod +x theScript
which allows you to execute the script. Now open up your .bashrc from /home/username/.bashrc and add the following line to the end of it.
export PATH=$PATH:/home/username/scripts
then save the .bashrc and close it. The changes have now been applied, but you must open a new terminal for it to take effect in that terminal.
-Getting better at this
I wrote up a simple bash script that automates creating a .java file template the way I like my java programs laid out. What I wanted to do was be able to use this bash script from any directory. From my /home/username directory I had created another directory /home/username/scripts that is intended to house any scripts I write up.
It is simple enough to write a bash script and access it from any directory via
> bash /home/username/scripts/theScript args
but I wanted something simpler. Something like
> theScript args
And here's how it's done. You have written a script (theScript) and placed it in your /home/username/scripts directory. Now change the permission of the script
> chmod +x theScript
which allows you to execute the script. Now open up your .bashrc from /home/username/.bashrc and add the following line to the end of it.
export PATH=$PATH:/home/username/scripts
then save the .bashrc and close it. The changes have now been applied, but you must open a new terminal for it to take effect in that terminal.
-Getting better at this
Tuesday, July 19, 2005
teh funny button masher
Skater girls and nurses
How about both rolled into one? I saw one, you know. I was on my way back from the beach, driving home with my girlfriend. And on the walkway that runs parallel to the street I see a tall blonde girl in a nurses smock on a skateboard going to work. My girlfriend caught me staring. It didn't help that I exclaimed "That. Is. AWESOME." So I'm still making that up to her.
-I love you dear.
In other news
Hapless .gif beats himself to a pulp.
-Deeper shade of red.
How about both rolled into one? I saw one, you know. I was on my way back from the beach, driving home with my girlfriend. And on the walkway that runs parallel to the street I see a tall blonde girl in a nurses smock on a skateboard going to work. My girlfriend caught me staring. It didn't help that I exclaimed "That. Is. AWESOME." So I'm still making that up to her.
-I love you dear.
In other news
Hapless .gif beats himself to a pulp.
-Deeper shade of red.
Subscribe to:
Posts (Atom)