# 數位時鐘（while迴圈）

### 執行以下指令,看看顯示效果

date +'%Y %b %e 星期%a%n%I:%M:%S %p'

使用 while loop​ 製作時鐘(while 條件;do ....;done)

```
date +'%Y %b %e 星期%a%n%I:%M:%S %p'
while sleep 1
do
    #始終保持游標向上移動兩行
    tput cuu 2
    #顯示時間
    date +'%Y %b %e 星期%a%n%I:%M:%S %p'
done

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled-4/shell-script/shu-wei-shi-zhong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
