3 # random position of stdin marker
4 cnt
=$
(aur query
-t info aurutils aurutils-git
- </dev
/null | jq .resultcount
)
6 cnt
=$
(aur query
-t info aurutils
- aurutils-git
</dev
/null | jq .resultcount
)
8 cnt
=$
(aur query
-t info
- aurutils aurutils-git
</dev
/null | jq .resultcount
)
11 # concatenation of stdin and command-line arguments
12 cnt
=$
(aur query
-t info aurutils
- <<< 'aurutils-git' | jq .resultcount
)
13 (( cnt
== 2 )) ||
exit
15 # multiple stdin markers
16 cnt
=$
(aur query
-t info
- - aurutils
</dev
/null | jq .resultcount
)
17 (( cnt
== 1 )) ||
exit
18 cnt
=$
(aur query
-t info
- aurutils
- </dev
/null | jq .resultcount
)
19 (( cnt
== 1 )) ||
exit
20 cnt
=$
(aur query
-t info aurutils
- - </dev
/null | jq .resultcount
)
21 (( cnt
== 1 )) ||
exit
27 # no arguments specified
30 aur query
-t info
- </dev
/null