Can someone explain how to correctly do an if/else in bash when comparing a parameter to a string? In detail please, I tried to combine elements of these websites 1 2 3 but I don't know what went wrong.
#!/bin/bash
sellx=125
selly=154 #top
itemwidth=10
#takes in two params $1=buy/sell $2=number in buy or sell
ModifyItem(){
if [["$1"=="sell"]]
then
xdotool mousemove "$sellx" "$(($selly+$2*$itemwidth))";
else
echo "nope";
fi
}
ModifyItem sell 2