Public paste
zsh array
By: iT|Free | Date: Dec 8 2008 13:26 | Format: None | Expires: never | Size: 199 B | Hits: 743

  1. #!/bin/zsh
  2. a=($@)
  3. for ((i=1; i <= ${#@}; i++)); do echo element $i is: $@[$i]; done
  4.  
  5.  
  6.  
  7.  
  8. ./test.zsh -x one two three
  9. element 1 is: -x
  10. element 2 is: one
  11. element 3 is: two
  12. element 4 is: three
Latest pastes
31 seconds ago
3 days ago
15 days ago
20 days ago
22 days ago