Scripting Question:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can someone tell me how to determine how many parameters are passed to a
script when the script is called?

For example a simple script called trythis:
#!/bin/bash

Echo -e $0

And when you call the script:
trythis 1 2 3 4 5

I get the output 
trythis

What I want to see is that 5 parameters were passed to the script.

Any suggestions?

Steve Dawes
Phone: (403) 268-5527
Email: SDawes at calgary.ca
 
 


NOTICE -
This communication is intended ONLY for the use of the person or entity named above and may contain information that is confidential or legally privileged. If you are not the intended recipient named above or a person responsible for delivering messages or communications to the intended recipient, YOU ARE HEREBY NOTIFIED that any use, distribution, or copying of this communication or any of the information contained in it is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone and then destroy or delete this communication, or return it to us by mail if requested by us. The City of Calgary thanks you for your attention and cooperation.





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux