deajan / tcpping

tcpping script for smokeping that runs with newer linux traceroute binaries
GNU General Public License v3.0
127 stars 39 forks source link

Illegal option error when running script #10

Closed netstx closed 3 years ago

netstx commented 3 years ago

I get the following when trying to run tcpping, even after making the file executable:

# tcpping 
/usr/bin/tcpping: 74: set: Illegal option -o pipefail

Any ideas on how to fix this?

deajan commented 3 years ago

What OS / shell are you running ?

netstx commented 3 years ago

@deajan I tested on Debian 10 with the stable bash (v 5.0)

deajan commented 3 years ago

Actually, you're not using bash, but dash, which does not have certain bash options. I've commited a shell check in https://github.com/deajan/tcpping/commit/91996e3a3d830301016eb7f053de3be5c329ff5a

Feel free to test that version. Another solution is to change the first line of the script to #!/usr/bin/env bash.

netstx commented 3 years ago

Thanks a lot, @deajan. The line change has fixed it, I will take a look at your commit also.