Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 23rd, 2005, 1:12 AM   #1
Teecha
Newbie
 
Teecha's Avatar
 
Join Date: Aug 2005
Location: U.S.
Posts: 13
Rep Power: 0 Teecha is on a distinguished road
Send a message via AIM to Teecha Send a message via MSN to Teecha Send a message via Yahoo to Teecha
My First Shell Script

Ok. So my husband (Infinite Recursion) has been coding the last few nights, so I decided I wanted to learn a few things too. He gave me an assignment to write a script that would echo the parameter input. Well, it only took me about 10 minutes, and I got it written, and working (ALL by myself with NO help from him I might add)! Honestly, I know absolutely NOTHING about this stuff, so I'm beaming right now. He's SO proud of me too! lol Anyway, he wanted me to post y'all my script, so here it is...

#!/bin/sh

# Rebecca Powers     
# November 22, 2005
# Script will display parameter input.

echo -n "Please type your parameter: "                      
read -e PARAMETER                 
echo You typed in: $PARAMETER

Last edited by Teecha; Nov 23rd, 2005 at 1:35 AM.
Teecha is offline   Reply With Quote
Old Nov 23rd, 2005, 1:30 AM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Yep... definitely very proud of her... especially considering I was just expecting "echo $1"

Here's the "historical" file...
http://jasonpowers.net/rcode.html
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Nov 23rd, 2005, 1:43 AM   #3
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Nice going!

I should learn some shell scripting soon, but i'm busy improving my skills with Python.

Your script is even commented great stuff keep it up.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Nov 23rd, 2005, 8:50 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Great job. I woulda used "echo $1". Keep it maintainable, although IR has asked me not to fire you, whatever the provocation.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 23rd, 2005, 9:26 AM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Woo! IR, don't let her stop now!
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 24th, 2005, 11:52 PM   #6
Kilo
Expert Programmer
 
Kilo's Avatar
 
Join Date: Nov 2005
Location: In Pink Clam?
Posts: 542
Rep Power: 0 Kilo is an unknown quantity at this point
Send a message via AIM to Kilo
congratz
__________________
"When in Rome, Do as the Romans Do"
"Beauty is in the eye of the BEER holder"
"Save your breath your going to need it for your blow up doll later"

SearchLores.org
Kilo is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:15 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC