Troubleshooting of bash script: Difference between revisions

Jump to navigation Jump to search
m
(Created page with "Resolving Common Bash Script Execution Errors __TOC__ == Common Bash Script Execution Errors == === How to fix Permission Denied Error: "unable to execute" === '''Error description:''' <pre> $ ./bash-script.sh unable to execute ./bash-script.sh: No such file or directory </pre> '''Resolution:''' Add execute permissions to the script using: <pre> $ chmod +x bash-script.sh </pre> === How to fix Line Ending Compatibility Error === '''Problem:''' <pre> $ ./bash-script.s...")
 
 
Line 26: Line 26:


'''Resolution:'''
'''Resolution:'''
Convert Windows line endings (CRLF) to Unix format (LF):
Convert Windows [[Return symbol | line endings]] (CRLF) to Unix format (LF):
<pre>
<pre>
$ sed -i 's/\r$//' bash-script.sh
$ sed -i 's/\r$//' bash-script.sh
Line 34: Line 34:




[[Category: Linux]] [[Category: Revised with LLMs]]
[[Category: Linux]]  
[[Category: Revised with LLMs]]

Navigation menu