I am creating alias in .bash_aliases
file in Ubuntu 14.04 with reference of this article
I write these
alias agi='sudo apt-get install'
alias upd8='sudo apt-get update'
alias perms='stat -c '%a - %n'
alias dwld='cd ~/Downloads'
alias ..='cd ..'
alias la='ls -alh'
alias hf='history | grep $1'
alias pf='ps -e | grep $1'
I close the terminal and file and start the terminal it always gives error.
bash: /home/ice/.bash_aliases: line 8: unexpected EOF while looking for matching `''
bash: /home/ice/.bash_aliases: line 9: syntax error: unexpected end of file
Please note there is not a line 9, no white space, no special character
What I have done so far
Removed white space new line and space between lines.
Remove last two lines but then error comes on last and next to last line ( 6 & 7)
Deleted the temp file on same folder ending with
~
but error remains.Removed the
..
andla
alias line ( may be it can cause issue) but error still remains.I have created an alias with
perms
from terminal before the creation of.bash_aliases
so removed that alias usingunalias perms
check all alias using
alias
and it show only first 2 alias andd interestingly first two aliases are working fine.
Is this some kind of bugs or what?
The syntax highlighting that Stack Exchange offers is enough to see what's wrong. It's this line:
The quote isn't closed. Try: