Quote:
Originally Posted by ABCDblade
Then teach me just show me some examples please.
|
If you have really been looking for the longest time and have not found this basic information, then you may well be unteachable...
On the other hand, since the question implies that this is one step in a series (i.e. "Modify the script file now stored in your bin folder..."), it seems to indicate that you may not have performed the previous steps which probably would have taught you how to perform this step...
Either of those behaviors are not beneficial for you, or those who might try to help you.
But, if you are really trying to learn how this works, a good place to begin (in addition to all the links provided by suicidalegroll) would be here:
Bash Guide for Beginners.
For your specific needs, read down to Section 3.2.5 - Special parameters, and in particular, positional parameters.
For an example, say that you have a script named myscript, which takes a path argument, you would run it like this...
Code:
myscript /path/to/something
Inside the script, the path argument would be found in the first positional variable, so your script would look something like this:
Code:
#!/bin/bash
if [ "$1" != "" ]; then
do_something_with $1
else
print "No path provided..."
exit 1;
fi
See what you can make from that beginning and let us know what you come up with. Good luck!