indent command - format code under Linux

    xiaoxiao2021-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)