Sponsored Content
Full Discussion: What is ${#1}?
Top Forums Shell Programming and Scripting What is ${#1}? Post 302939993 by vgersh99 on Tuesday 31st of March 2015 12:26:32 PM
Old 03-31-2015
man ksh yields:
Code:
       ${#parameter}
              Parameter length.  The length in characters of the value of parameter is substituted.  If param‐
              eter is * or @, the value substituted is the number of positional parameters.  If  parameter  is
              an  array  name  subscripted  by  * or @, the value substituted is the number of elements in the
              array.  If parameter is an indexed array name subscripted by a negative number, that  number  is
              interpreted  as relative to one greater than the maximum index of parameter, so negative indices
              count back from the end of the array, and an index of -1 references the last element.

 
All times are GMT -4. The time now is 01:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy