I don't think you're the only one with a bin full of scripts, Jared.
Maybe the only one in your condition though. ;)
I like comments in scripts. Yours are ok, and the code is fairly legible
too.
One simple concept eludes me though: What's it supposed to do?
(I'm not about to run it to find out!)
Jared Anderson wrote:
> Recovering from accident; too much spare time: bare with me.
>
> First was Festival; then after being introduced to xclip (thanks Mr Reed ;), my collection of silly scripts have flooded my $PATH.
>
> Curious. Am I the only one with a bin [somewhat,mostly,completely] full of silly scripts? I can't be.
>
> I'll show mine if you show yours? ;)
>
> Heres one of my favorites, not as useless as the others (it has seen some serious mileage, I tell you what). It derives it's value from key-stroke mapping... (Silly Script Tip: Can't go wrong when keystroke map or festival is involved)
>
> requirements: xclip, firefox (if ran as-is), keystroke software of some kind.....
>
> Usage: select URL -> run script (pref. w/ keystro... you get the picture..)
>
> [ Begin Silliness ]
>
> #!/bin/bash
> #Silly Script written by me under GPL - jRedGoldenSon -x- at -x- gmail -x- dot -x- Com
> #Barely local/bin quality - like it needs a license ;0)
> #reaches local/bin quaility only when mapped to key-stroke....
>
> declare -a ffxtriggas="https:// http:// www. ftp:// ftp. /"
>
> function keybegs {
> length=$(echo -n $1 | wc -m)
> perfix=$(xclip -o | cut -c -$length)
> }
>
> if [ -z $(xclip -o) ]; then #so firefox opens regardless of clipboard....
> /usr/bin/firefox &
> exit
> else
> for i in ${ffxtriggas[@]}; do
> keybegs $i
> if [ "$perfix" = $i ]; then
> /usr/bin/firefox $(xclip -o) &
> exit
> fi
> done
> fi
>
> if [ $(xclip -o | cut -c 1) = / ] && [ -x $(xclip -o) ]; then #yeah, weak, but sufficient
> /usr/bin/firefox $(xclip -o) &
> exit
> fi
>
> echo "Sorry: '$(xclip -o)' snot happenin" > /tmp/xclipperdurl.txt && /usr/bin/firefox /tmp/xclipperdurl.txt &
> exit
>
>
> [ End Silliness ]
>
> Now show me yours....
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
--
-Eric 'shubes'
"There is no such thing as the People;
it is a collectivist myth.
There are only individual citizens
with individual wills
and individual purposes."
-William E. Simon (1927-2000),
Secretary of the Treasury (1974-1977)
"A Time For Truth" (1978), pg. 237
****************************************************
This message has been scanned using Contraxx
Technology Group mail server v2.3 and is virus free.
****************************************************
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss