Error on executing if statement in ssh command in unix shell scripting. Linux and sunos
#!/bin/bash
ssh u1@s1 "if [ $a == 100 ]
then
echo Hey that is a large number
pwd
fi
date"
Error: Ksh: test: argument expected
Error on executing if statement in ssh command in unix shell scripting. Linux and sunos
#!/bin/bash
ssh u1@s1 "if [ $a == 100 ]
then
echo Hey that is a large number
pwd
fi
date"
Error: Ksh: test: argument expected
Copyright © 2021 Jogjafile Inc.
You'll get this if
$ais empty:Solution: quote the variable
Or use the double bracket conditional
I'm using ksh 93u+