#!/bin/bash
while :
do
echo twerkin
exec free -h > /ver/www/raspberry/load.txt
exec /opt/vc/bin/vcgencmd measure_temp > /var/www/raspberry/heat.txt
done
這就是我所做的,我將在我的網站上閱讀它,但那不是問題。問題是,它給了我這個錯誤:Bash exec無限while循環不起作用
[email protected] ~ $ sh showinfo.sh
showinfo.sh: 7: showinfo.sh: Syntax error: "done" unexpected (expecting "do")
我在我的Raspbian(Debian的喘息)樹莓派
請將錯誤添加到問題 – arco444 2014-10-22 10:26:24
添加錯誤,(以前在圖像中) – 2014-10-22 10:31:24
使用'sh'運行Bash腳本始終是錯誤。但是你的腳本在這裏工作得很好(除了明顯誤解'exec'的作用)沒有錯誤。 – tripleee 2014-10-22 10:32:39