${(t)…}
: Type of parameter
t
evaluates to a string describing the type of the parameter. Additional properties are separated by -
.
The first keyword describes the type:
- scalar
- array
- integer
- float
- association
The following keywords describe additional properties of the parameter. Please refer to the manual for a complete list of possible values.
Links
Examples
- Print types of parameters
- Output:
1 2 3 4 5 6 7
string=value declare -i int=42 declare -F float_value=42.0 declare -Argxu many=([10]=ten [42]="fourty two") echo ${(t)int} echo ${(t)float_value} echo ${(t)many}
1 2 3
integer float association-upper-readonly-export
BashSupport Pro ist eine Zsh IDE mit Unterstützung für ${(t)…} - probieren Sie es jetzt aus!