Quantcast
Channel: Bash OR operator - Unix & Linux Stack Exchange
Browsing index pages (2 articles)

Bash OR operator

My script is working with this:if pgrep -f "/home/tiger/bin/pymp">/dev/null 2>&1 ; thenI want it to check for mpv2 also.This is what I have so far:if [[ /usr/bin/pgrep -f...

View Article


Answer by DopeGhoti for Bash OR operator

The [[ and ]] operators are for explicit comparative tests. If you want to check two command results, just use the shell:$ if /usr/bin/pgrep -fq "/home/tiger/bin/pymp" || /usr/bin/pgrep -fq...

View Article

Browsing index pages (2 articles)


Latest Images