Browse Source

day of week variable, if statement in bash

master
Anthony Fadly 1 year ago
parent
commit
765824b381
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      oct1.md

+ 15
- 0
oct1.md View File

@@ -51,4 +51,19 @@ $ date +<format> # date in <format>

$ date +%A
Monday

$ DAY_OF_WEEK = $(date +%A)

$ echo $DAY_OF_WEEK
Monday
```

## If Statement
```
#!/bin/bash
if [[ boolean ]]; then
echo "true"
else
echo "false"
fi #end if
```

Loading…
Cancel
Save