Unix Shell of Dos2unix format conversion

Source: Internet
Author: User

This is a Unix shell in DOS UNIX format under UNIX.

1, Single File

Dos2unix [Srcfile] > [targetfile]

eg.

Dos2unix Reporter.java > Reporter.java.back

dos2unix-437 Reporter.java Reporter.java

2, Batch File

#!/bin/sh

Filelist= ' Find. -name ' *.java '

for filename in $filelist

Todo

dos2unix-437 $filename $filename

echo ' Convert ' $filename

Done

Echo ' finished! '

For Kevin and Xiao Si ' s help!

This article from the "Small Hebebe Technical Space" blog, please be sure to keep this source http://babyhe.blog.51cto.com/1104064/247259

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/unix/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.