[aklug] Re: Shell scripting is fun

From: Christopher Howard <choward@indicium.us>
Date: Sat Oct 25 2008 - 19:28:34 AKDT

Royce Williams wrote:
> Christopher Howard wrote, on 10/25/2008 5:06 PM:
>
>> Hey, this shell scripting stuff doesn't seem to be as hard as I thought
>> it was going to be! And it's fun too!
>> echo -e "Name please:\c"
>> read myname
>> echo "$myname is a stupid name."
>>
>
> Hello, Chris -
>
> Excellent! I've been looking for something that does this. ;-)
>
> What license is your new software distributed under? I'd like to submit a patch for possible inclusion in the main source tree.
>
> --- stupidname.sh 2008-10-25 17:59:07.000000000 -0800
> +++ stupidname.sh.new 2008-10-25 18:08:23.000000000 -0800
> @@ -1,3 +1,11 @@
> -echo -e "Name please:\c"
> +#!/usr/bin/bash
> +echo -e "Name please: \c"
> read myname
> echo "$myname is a stupid name."
> +
> +MOREUSERS=`cut -d\: -f5 /etc/passwd | awk '{print $1}' | egrep -v '^#'`;
> +
> +for othername in ${MOREUSERS}; do
> + echo "$othername is also pretty stupid."
> +done
> +
>
> Is there a CVS/Subversion/GIT repository somewhere?
>
> Royce
>
>
Har har har... okay, so I guess three lines of code doesn't exactly make
me a shell scripting guru. :)

Heck, I'm not even sure how to use CVS yet. I tried once but couldn't
even get logged onto the server. (I think the server was down...)

-- Binary/unsupported file stripped by Ecartis --
-- Type: text/x-vcard
-- File: choward.vcf

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Oct 25 19:28:55 2008

This archive was generated by hypermail 2.1.8 : Sat Oct 25 2008 - 19:28:56 AKDT