Bash file cannot be run, prompting no solution for that file or directory

Source: Internet
Author: User
The bash file cannot be run, prompting no solution for that file or directory http://hi.baidu.com/whyspai/blog/item/d24b905430bc88093b293549.html

/bin/bash^m: Damaged interpreter: Not that file or directory 2011-04-20 14:07

Now in the Broadcom BCM2157 platform, sent to our platform source package only provides a patch, need to download the specified Android source from the Internet, the document to download the source part of the command used many of the commands can not be used, do not know why. According to the normal method of downloading the specified version, the execution of the shell file when the patch results reported as follows error:

Allen@dell-ubuntu:~/work$/bin/bash^m: Damaged interpreter: No file or directory

On-line inquiries get the following information:

Sometimes you write scripts with errors that are listed like headings, mostly because your script files are edited under Windows. Windows, the end of each line is \n\r, and in Linux under the end of the file is \ n, then you edit the file in Windows under Linux open to see the end of each line will be more than one character \ r, you can see this when you use CAT-A filename The r character is displayed as a ^m, and it is only necessary to delete this character. You can use the command sed-i ' s/\r$//' filename.

It seems that the. sh file sent to us has been compiled under Windows. Execute the following command OK:

allen@dell-ubuntu:~/work$ sed-i ' s/\r$//' apply_brcm_patch.sh


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.