Execute Linux script with no Such file or directory exception

Source: Internet
Author: User

Recently in the learning of the Linux system script development, when I finished writing specimens, the following situation occurred

This time there is no Such file or directory situation appears, the hint files do not exist;

But this script is accessed through the VIM command, which is able to enter this script

This time I guess, probably because of the coding problem, because I write this script in the WinDOS system using nodpad++ (NODPAD encoding format is ANSI), and then connect to the Linux server through secure, To paste.

I continue to pass under the Vim Editor:set ff? find the encoding format as follows:

The discovery of an invisible character in the encoding format for Dos,dos causes the Linux execution to fail

This time we can pass : set Ff=unix conversion format for UNIX, modify save exit, execute my script again can specify success.

Execute Linux script with no Such file or directory exception

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.