Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/dash
- busybox_has() {
- builtin command -v busybox >/dev/null ||
- return 1
- # Sanitize searches for '[' and '[['
- a=$1
- a=${a//[/\\[}
- if [[ "$1" = "[" ]]; then
- busybox | egrep -oq $'\t'"($a)[,[:space:]]" ||
- return 1
- else
- busybox | egrep -oq "[[:space:]]($a)[,]?" ||
- return 1
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement