I am using ubuntu 18.01,when I add below command to ~/.bashrc with vim:
# myself add
alias lsa='ls -lart'
alias lsl='ls -lrt'
alias lm='ls -al|more'
for example:
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# myself add
alias lsa='ls -lart'
alias lsl='ls -lrt'
alias lm='ls -al|more'
save ~/.bashrc then run command:
source ~/.bashrc
get error:
bash: alias: : not found
If I comment out myself add code ,It's ok.
for example:
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# myself add
#alias lsa='ls -lart'
#alias lsl='ls -lrt'
#alias lm='ls -al|more'
What should I do?
When I run command:
file ~/.bashrc
it output:
/home/hello/.bashrc: UTF-8 Unicode text
My problem be solved.Thank you all.
od -t x1z .bashrc) if there is any non printing character in your alias commands. That space between:and:is suspicious.