Change postional parameter
Hi... I m using RHEL5. As by Redhat Linux Positional parameters are from $0 - $9. Is there any way to increase this for ex. $0 - $ 15.
Please give me the file associated with positional parameter. Thanks in advance..... |
You are talking about BASH syntax....it is not specific to RedHat (or any other distro)
There are several good books on BASH---eg "BASH Guide for Beginners" and "The Advanced BASH Scripting Guide"(ABS)---both free at tldp.org. I recommend downloading ABS and using it for searches. From ABS: $1 - $9 = positional parameters #1-9 ${10} = positional parameter #10 I don't know how high you can go ( I tried 13 and it worked) Quote:
|
See this page http://www.tldp.org/LDP/abs/html/othertypesv.html
By default the normal limit is 10 params (0-9). If you want to go beyond that, you can use ${10}, ${11} etc or the old school way, use the 'shift' cmd, see sect 4.7 on that page. |
All times are GMT -5. The time now is 10:08 AM. |