![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
|
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. |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
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." |
|
|
|
|
|
#3 |
|
Expert Programmer
|
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.
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Woo! IR, don't let her stop now!
![]() |
|
|
|
|
|
#6 |
|
Expert Programmer
|
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|