1

script migration from CentOs to Debian - error message "[: 10: -lt: unexpected operator"

view story
linux-howto

http://serverfault.com – As I was trying to execute a script in a new environment, I came up with this error: [: 10: -lt: unexpected operator Here is the painful part of the script: start=$SECONDS end=$((SECONDS+60)) while [ $SECONDS -lt $end ]; do ... done Origin system: Amazon Linux AMI release 2013.09 (cpe:/o:amazon:linux:2013.09:ga) Destination system: Debian version 6.0.7 I can read that shell / bash / dash versions can vary, but this is still quite obscure to me. I tried to specify the correct shell on the first line of the script: #! /bin/bash or #! /bin/sh no chance... I could also find out (HowTos)