Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. if [[ -n ${(M)myarray:#-test.*} ]]; then
  2. echo "there are ${(M)#myarray:#-test.*} test flags"
  3.  
  4. % echo ${(M)#myarray[1,-1]:#-test*}
  5. 2
  6. % echo ${(M)#myarray[2,-1]:#-test*}
  7. 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement