Science Blog of Dr. Yuan分享 http://blog.sciencenet.cn/u/albumns This blog is mainly on Molecular molecular modelling and simulations

博文

dos2unix, simple and helpful command

已有 3324 次阅读 2013-1-26 01:34 |个人分类:Linux相关|系统分类:科研笔记| Linux, command, dos2unix

Recently my colleague N provided me a script converting Desmond Viparr1 format into Vippar3 format. When I tried to run it under my Linux OS, it always claimed:

: command not foundine 30:
awk: cmd. line:1: fatal: cannot open file `XJUNKX' for reading (No such file or directory)
awk: cmd. line:1: fatal: cannot open file `XJUNKX1' for reading (No such file or directory)
awk: cmd. line:1: fatal: cannot open file `XJUNKX2' for reading (No such file or directory)
awk: cmd. line:1: fatal: cannot open file `XJUNKX3' for reading (No such file or directory)


I turned to N for helps, and he told that he tested it again and it worked fine under his OS. After an hour checking, we finally found the problem:
N wrote those script under Windows instead of Linux, and it introduced many

Trailing characters: ^M

which was regarded as  blank characters Under Linux. That's why the first line of the log claimed:

: command not foundine 30:

After finding the reasons, the scripts were processed by command dos2unix, and they worked fine now.



https://wap.sciencenet.cn/blog-355217-656622.html

上一篇:Four-stranded ‘quadruple helix’ DNA found in Cambridge
下一篇:Compile VMD-1.9.1 from source code
收藏 IP: 128.178.56.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-25 08:53

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部