[Ilugc] Shell script with arguments
benignbala at gmail.com
Tue Jul 17 18:13:41 IST 2012
On Tue, Jul 17, 2012 at 5:57 PM, Vijay Kumar <vijayakumarnkdr at gmail.com> wrote:
> Hi All,
> I need some help/ideas in coming up with a shell script.
> For example, if I type in pkgscript.sh a1 a2 a3, it should install all the
> 3 scripts and pkgscript.sh a1 should install only a1.
Use $# and $@. A rough outline is :
if [[ $# == 0 ]]; then
for pkg in "$@"
Please read up on bash programming. This will be covered there. thanks
Arise Awake and stop not till the goal is reached.
- Swami Vivekananda
Mail: benignbala at gmail.com
More information about the ilugc