bug-bash
[Top][All Lists]
Advanced

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

Re: Bug on function.


From: Pierre Gaston
Subject: Re: Bug on function.
Date: Tue, 8 Dec 2015 11:50:53 +0200



On Tue, Dec 8, 2015 at 10:29 AM, Kelvin Tan Thiam Teck <kelvintx3@gmail.com> wrote:
dumbass@Lucifer:~$ ./report.sh 'echo' 1 2 3 4 5 6 7 8 9 10
param 1  : echo
param 2  : 1
param 3  : 2
param 4  : 3
param 5  : 4
param 6  : 5
param 7  : 6
param 8  : 7
param 9  : 8
param 10  : echo0
param 11  : echo1
param 12  : echo2
param 13  : echo3
param 14  : echo4
param 15  : echo5
param 16  : echo6
param 17  : echo7
param 18  : echo8

always hard to understand what you mean by a simple output...ok your other problem is that you need:
echo "${11}" to display the 11th argument, echo $11 is really the same as echo  "${1}"1, it appends a 1 after "$1"

set --  one two three four five six seven  eight nine ten eleven;echo "$11";echo "${11}"
one1
eleven

 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]