像:
STRINGLIST="a b c_d e,f"
for ele in $STRINGLIST
do
echo $ele
done
結果output 就是:
a
b
c_d
e,f
所以要一個一個加string array 內容是..
SARY="a"
SARY=$SARY" b"
SARY=$SARY" c"
echo $SARY
結果會是:
a b c
STRINGLIST="a b c_d e,f"
for ele in $STRINGLIST
do
echo $ele
done
a
b
c_d
e,f
SARY="a"
SARY=$SARY" b"
SARY=$SARY" c"
echo $SARY
a b c
dd if=/dev/zero of=10G bs=1G count=10
這樣會花一些時間,硬碟把 00 寫入 10G 的 file。dd if=/dev/zero of=10G bs=1 count=0 seek=10G
這樣馬上就可以create 出來。<N_Series>MyBrowser.apk</N_Series>
# mount -o uid=charles-chang,gid=charles-chang /dev/sdd1 ~/sd
mount -t cifs -o username=softwaretest,password=softwaretest,iocharset=utf8,uid=charles-chang,gid=charles-chang //192.168.147.225/ODM3 /home/charles-chang/buildingmachine
#/bin/sh
find . -type d -name '.git' | while read F; do
D=$F/../
cd "$D"
echo $PWD
git status
cd - > /dev/null
echo ---------------
done
找到的 path 含 .git,所以要cd 到 .git 上一層。 cd -
不要把 cd - 的 command 印(echo) 出來,所以加上 > /dev/null "${filename...}"
for file in *.mp4;do mv "$file" "${file/.mp4/.avi}";done
sed '/match string/d' file > out
sed '/match string/d' infile > out
sed '/stringA/d' -e '/stringB/d' -e '/stringC/d' infile > out
# delabc : del stringA.B.C
/stringA/d
/stringB/d
/stringC/d
sed -f delabc infile > out