首页
IT
登录
6mi
u
盘
搜
搜 索
IT
indent command - format code under Linux
indent command - format code under Linux
xiaoxiao
2021-03-25
119
在Windows下使用Source Insight 编写完代码后,将代码上传到Linux机器上,首先需要去掉’^M’:
[root
@localhost
c-test]
# tr -d "\015" <source_file.c> source_file.c.bak
[root
@localhost
c-test]
# mv source_file.c.bak source_file.c
然后再使用indent命令格式化代码:
[root
@localhost
c-test]
# indent -npro -nip -nlp -npsl -i4 -ts4 -sob -l200 -ss -bl -bli 0 source_file.c
转载请注明原文地址: https://ju.6miu.com/read-10127.html
技术
最新回复
(
0
)