View Single Post
  #2   (View Single Post)  
Old 9th July 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Default

Ok, so you have a script called /bin/script.sh - when you follow that with arguments like First and Last there are already variables built in to allow you to use them.

/bin/script.sh First Last is going to store the value of First in $1 and Last in $2 - so if you script contained something like:

#!/bin/sh
echo "Your name is: $1 and your surname is: $2"


you'd be closer to solving this problem.

EDIT:

Actually, this is pretty ugly - there's a fairly good introductory tutorial over here.

Last edited by dk_netsvil; 9th July 2008 at 05:21 PM.
Reply With Quote