Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 11:18 on June 26, 2006


$# Problems

1.sh content

= 1
Echo $#
$i -le $# Do [while]
I=$i
Echo $i
I=`expr $i + 1`
Done

I write, but fails to achieve its aim

Executing orders 1.sh dd tt
I think in the course of implementation will 1.sh dd, tt show, but instead of a fixed number of parameters with 1.sh
How to achieve this?

$# Problems

$# Positional parameter is the quantity. . .
Dd tt significant as you want to and may test :
Echo or echo $* $
If you do use for : for i do echo $i; done in $@;
If you do use while : while [ "$ 1"] do echo shift; done $ 1;

$# Problems

The second interception of parameters, including how all parameters?
For example 1.sh tt dd ff
I would like to have conferred a variable dd ff
1.sh parameter is "1, volatile

$# Problems

Ah? Oh, your request is not clear. . .

If we want to achieve a "second parameter all parameters," test :
Shift 2
Echo $*



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com