網路城邦
上一篇 回創作列表 下一篇  字體:
bin sh for
2018/09/28 13:25:18瀏覽89|回應0|推薦0

for i1 in $(seq 0 23);
do
    st1=`cat /sys/devices/virtual/thermal/thermal_zone$i1/type`   
    st2=`cat /sys/devices/virtual/thermal/thermal_zone$i1/temp`
    echo $i1 $st1 $st2
done


#!/bin/bash

declare -a st_array=( 

"cat1"

"cat2"

"cat3"

)

for (( i=0; i<${#st_array[@]}; i++ ))

do

echo "${st_array[$i]}"

done

echo "-------"

for st1 in "${st_array[@]}"

do

echo $st1

done 

( 心情隨筆心情日記 )
回應 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=greatcat&aid=116794494