瀏覽代碼

if statement with date command

master
Anthony Fadly 1 年之前
父節點
當前提交
2438004468
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11
    0
      oct1.md

+ 11
- 0
oct1.md 查看文件

@@ -59,6 +59,7 @@ Monday
```

## If Statement

```
#!/bin/bash
if [[ boolean ]]; then
@@ -67,3 +68,13 @@ else
echo "false"
fi #end if
```

## If Statement with Date Command

```
#!/bin/bash # ShaBang for Bash Script

DAY_OF_WEEK=$(date +%A) # set var to output of date command eg "Monday"

if [[ "$DAY_OF_WEEK" == "Monday" ]]
```

Loading…
取消
儲存