Comments (3)
What OS did you run this on ?
Changing line 1 to /usr/bin/env bash
could possibly make tcpping fail on FreeBSD, need to investigate.
from tcpping.
I honestly don't remember. I would guess smokeping on a recent version of either raspbian or ubuntu. The only problem was the use of ==
on line 341. Dash is apparently the worst but not only offender: https://unix.stackexchange.com/a/382012
Bash isn't providing any features here, so there's not a need to use it, and like you said there's potential issues with forcing it. I only gave that as one of the ways I resolved it to be thorough. For cross-shell compatibility, avoiding bashisms seems preferable anyway.
from tcpping.
Hi,
Same behavior on ubuntu 20.10. ==
is not a valid operator on this dash
version.
alice@bob:~/src$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy
alice@bob:~/src$ which sh
/usr/bin/sh
alice@bob:~/src$ ls -l /usr/bin/sh
lrwxrwxrwx 1 root root 4 mars 30 2020 /usr/bin/sh -> dash
alice@bob:~/src$ apt-cache policy dash
dash:
Installed: 0.5.10.2-7
Candidate: 0.5.10.2-7
Version table:
*** 0.5.10.2-7 500
500 http://fr.archive.ubuntu.com/ubuntu groovy/main amd64 Packages
100 /var/lib/dpkg/status
alice@bob:~/src$ dash
$ test "a" == "b"
dash: 1: test: a: unexpected operator
$ test "a" = "b"
$ echo $?
1
$
from tcpping.
Related Issues (13)
- [: unexpected operator (patch attached) HOT 5
- doesnt work without root or sudo HOT 3
- Same subnet IPs will trigger bogus results HOT 1
- Unable to run tcpping for a specific host HOT 4
- Unable to run 'sudo traceroute -M.." HOT 2
- trap: SIGQUIT: bad trap HOT 1
- unable to use with Docker (busybox) traceroute: unrecognized option: M HOT 3
- Illegal option error when running script HOT 4
- script gives error on debian buster sleep: invalid time interval 'auto' HOT 1
- Tcpping output out of order HOT 3
- Tcpping reporting "no response (timeout)" for extended time HOT 2
- Do the -n and -C options in the tcpping command result in no response?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcpping.