- 論壇徽章:
- 60
|
1 .
shell 基礎二十篇:
http://72891.cn/thread-452942-1-1.html
shell 十三問:
http://72891.cn/thread-218853-1-1.html
2. 用 vim 編寫,不會 vim 建議先去學學 vim 的使用。
3. 貌似你的雙引號有的還是中文的雙引號,不知道是不是你打錯了?- [root@centos6-1 ~]# cat file
- 13800131,“李小軍”, doctor
- 1,"牛豪",batman
- 23,"無",governer
- [root@centos6-1 ~]#
- [root@centos6-1 ~]#
- [root@centos6-1 ~]# cat file | sed 's/,/\t/g;s/"//g;s/“//g;s/”//g' | column -t
- 13800131 李小軍 doctor
- 1 牛豪 batman
- 23 無 governer
- [root@centos6-1 ~]#
- [root@centos6-1 ~]# awk -F, '{gsub(/"|“|”/,"")}NF+=0' file | column -t
- 13800131 李小軍 doctor
- 1 牛豪 batman
- 23 無 governer
- [root@centos6-1 ~]#
復制代碼 |
|