我正在运行一个脚本,它应该在文件名中输出一个时间戳。它有效,但它保持相同的日期和时间。
我究竟做错了什么?剧本:
#!/bin/bash FOR 192.168.2.20
cd Videos/VideoCaptures
counter=0
while :
do
echo "\nCount No = " $counter
currentdate=`date +"%Y-%m-%d-%Hhr-%Mmin-%Ssec"`
sudo openRTSP -D 1 -c -B 10000000 -b 10000000 -4 -Q -F $currentdate -P 3600 -w 1920 -h 1080 -K -t -u admin 12345 rtsp://admin:12345@192.168.2.20:554/ch0_0.h264
counter=$((counter+1))
done
exit
我得到这个: