Posts by André Pires • 1 point
1 post
-
-2
votes1
answer36
viewsQ: Bash - current date and calendar with "if Else"
#!/bin/bash echo "1 - calendario" echo "2 - data" echo "opção: " read var if [$var -eq 1]; then calendario=$(cal) echo $calendario elif [$var -eq 2]; then now=$(date) echo $now else echo "opção…