use IFS in bash
[python]
function dfd()
{
#http://www.2cto.com/os/201309/243382.html
IFS=$'\n'
for i in $(lsd);do
du -sh "$i";
done
}
[html]
#!/bin/bash
IFS_old=$IFS #將原IFS值保存,以便用完後恢復
IFS=$’\n’ #更改IFS值為$’\n’
for line in `cat file.txt`
do
echo $line
done