Giter Club home page Giter Club logo

Comments (3)

deajan avatar deajan commented on August 22, 2024

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.

dinwiggy avatar dinwiggy commented on August 22, 2024

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.

az-blip avatar az-blip commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.