I have/had ~/.bashrc_aliases.sh
(a file containing bash aliases) sourced by my ~/.bashrc
file. This ~/.bashrc_aliases.sh
file somehow happened to be in DOS format which I fixed by running dos2unix
on the file.
When this alias file was in 'DOS' format, whenever I typed the alias
command in Bash, the alias
lines were starting with the '
character instead of a
, and the aliases wouldn't really work, so I got stuff like:
": No such file or directory", "'s: invalid option -- '"
etc.
What was going on when the file was in DOS format? Why was the alias
command returning lines starting with the '
character? Why was I getting the above error?
marked as duplicate by kenorb, tripleee bash
This question has been asked before and already has an answer. If those answers do not fully address your question, please edit this question to explain how it is different or ask a new question.
The question linked to was asking how to fix the problem. While this question was asking for an explanation as to what was happening during the problem, not how to fix it.