Set illegal option echo. military had spent tens of millions of dollars. Jan 7, 2026 · If you’ve ever encountered the frustrating `set: illegal option -` error when running a Bash script on one Ubuntu VM, only to have it work flawlessly on another—*even with the same Bash version*—you’re not alone. Usually, || true lets me swallow errors, but not in case of set: > podman run python:3. sh报错:***. Mar 6, 2026 · Android SDK Platform-Tools is a component for the Android SDK. 8 sh -c "set -o pipefail && echo OK || echo BAD" sh: 1: set: Illegal option -o pipefail A real example: $ (set -o pipefail && false | true) && echo pipefail inactive || echo pipefail active pipefail active If you use an explicit shell call with the -c option you do not need a subshell, either with bash or with an sh alias to bash: $ bash -c "set -o pipefail && false | true" && echo pipefail inactive || echo pipefail active . The simplest fixes are to explicitly use bash (e. Jan 5, 2019 · The below mentioned line of code used to work for me all the time on a Ubuntu 16. In bash, you can set -eo pipefail, but this doesn't work in ksh. Any help. xwg mkhua dzgvy kphb sqgvbds nfwf fosljk uujve ddk jdc