Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 519 Bytes

08292022.md

File metadata and controls

18 lines (11 loc) · 519 Bytes
  1. This error below will be appeared whenever an user copy text file formatted from Windows (LF) to Linux (CRLF):
  • Error: /bin/bash^M: bad interpreter: No such file or directory.

  • How to fix:

sed -i -e 's/\r$//' scriptname.sh

# Press `Ctrl+V` -> `Ctrl+M` to insert that `^M`:
sed -i -e 's/^M$//' scriptname.sh
  1. Search by inverse matching pattern with regex: