怪怪的自動格式轉換–unix2dos解決

剛在某台Ubuntu將bash.bashrc使用ftp傳送到windows 2008上的ftp server,接著將此檔案使用隨身碟COPY至另一台Ubuntu,接著下source /etc/bash.bashrc竟然出現: command not found,又沒寫行號,想不出甚麼原因,後來全部砍掉,加單純的一行alias,嗯,可以。所以是空白行出的問題,再用VI開一次,下面看到[dos]的標示,可是畫面上沒有^M,怪哉。

最後使用unix2dos -d /etc/bash.bashrc 多跑幾次就可以了(只跑一次還不行),不知道在哪個步驟被加上去的。

This entry was posted in 電腦和網際網路. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s