bug
1. cd: 2: can’t cd to /test
#!/bin/sh
cd test
mkdir $(date +%d-%mm-%Y)
When I run this, I get can’t cd to test
cd: 2: can’t cd to /test
解决方案
tr -d "\r" < oldname.sh > newname.sh
2. 文章 linux 文件编码问题
解决方案
vi ~/.vimrc
set encoding=utf-8 fileencodings=ucs-bom,utf-8,cp936