andylin02 发表于 2013-1-26 14:09:32

shell中双引号的误用

 

for i in "$LIST":#!/bin/bashLIST="a b c d"echo "first type"for i in $LISTdo      echo $i;doneecho -e "\n\n";echo "second type"for i in "$LIST"do      echo $idone 
 
结果:

first type
a
b
c
d
 
 
 
second type
a b c d
 
 
 
页: [1]
查看完整版本: shell中双引号的误用