Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8142

General programming discussion • [SOLVED]Re: bash programming compare operation acting differently in crontab

$
0
0
Issus resolved. Was doing the mistake of not adding shell to the script.

Code:

#!/bin/bashvar1="a"var2="a"if [ "$var1" == "$var2" ]; then echo "same" >> /home/pi/test.logelse echo "notsame" >> /home/pi/test.logfi

Statistics: Posted by sim_tcr — Fri Nov 22, 2024 5:38 am



Viewing all articles
Browse latest Browse all 8142

Trending Articles