allora, tanto per imparare cerco di fare un programma sh
se ora è minore di 12, variabile vale tot, altrimenti tot
ho tirato fuori questo codice
uno schifo, eh?codice:$ora=$(date +%H) if[$ora -ge 12] then $tipo="N" else $tipo="G" fi echo "tipo $tipo"
ricevo questi errori
suggerimenti?./provaif.sh: line 1: =10: command not found
./provaif.sh: line 2: if[ -ge 12]: command not found
./provaif.sh: line 3: syntax error near unexpected token `then'
./provaif.sh: line 3: `then'