Arguments
- Arguments are accessed positionally.
- $1 is the first argument, $2 is the second argument, $3 is the third argument, $4 is the fourth argument, ...
- $0 is the command that has been run.
- Update your myll shell script to add:
echo "Running command $0"
- Run it from your cmd directory; run it from your home, both with a relative and an absolute path.
- What do expect to see? What do you see?
- Change the ls command in the myll script to use $1. Run it again from different directories - what do you expect to see? What do you see?
- Do you need to use quotes around $1? Why or why not? If so, which type of quotes?