sed command windows and Linux line break

Source: Internet
Author: User

There is an SED operation in the Linux Bash command, which is useful in SSD create_list.sh:

Combined with the following explanation:

That is, delete all the characters in the line with voc2007/annotations/(here \ representative escape);

The reason to notice this problem, because I did before, the files under the Windows directly copied to the Linux system, the results when running create_list.sh error, and later found that because of Windows and Linux under the new line characters caused.

The line break under Windows is \ r \ n, and Linux is \ n, so the script has to make the following modifications to:

That is, the fact that the original is appended directly to the. jpg or. xml is now required to replace \ r with. Xml.

In addition, the following solutions are available:

sed command windows and Linux line break

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.