/etc/bash.bashrc errors
I am attempting to customize my prompt in Arch Linux which is running on a Raspberry Pi. This is exactly how my bash.bashrc looks. When I try to open a terminal (and that bash script gets run) I see the following output:
line 15: conditional binary operator expected
line 15: syntax error near `*i*'
line 15: `[[ $- != *i* ]] && return'
I also run Arch Linux on my laptop and have not seen any of these issues, using the exact same bash.bashrc. The bash versions are identical, 4.2.45. I even added a shebang #!/bin/bash to ensure that it was trying to run it with bash, to no avail. The exact same errors are posted.
As both computers have the exact same version of bash, I'm led to believe the Pi is not actually trying to use bash to run it.
It is also worth mentioning that if I comment out line 15, the other lines with similar (illegal) syntax, etc., get flagged with errors as well.
Update: The plot thickens when I take a look at /etc/skel/.bashrc. It looks like this:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
And it works totally fine when I use it as my .bashrc and bash.bashrc. Why is that?
I am attempting to customize my prompt in Arch Linux which is running on a Raspberry Pi. This is exactly how my bash.bashrc looks. When I try to open a terminal (and that bash script gets run) I see the following output:
line 15: conditional binary operator expected
line 15: syntax error near `*i*'
line 15: `[[ $- != *i* ]] && return'
I also run Arch Linux on my laptop and have not seen any of these issues, using the exact same bash.bashrc. The bash versions are identical, 4.2.45. I even added a shebang #!/bin/bash to ensure that it was trying to run it with bash, to no avail. The exact same errors are posted.
As both computers have the exact same version of bash, I'm led to believe the Pi is not actually trying to use bash to run it.
It is also worth mentioning that if I comment out line 15, the other lines with similar (illegal) syntax, etc., get flagged with errors as well.
Update: The plot thickens when I take a look at /etc/skel/.bashrc. It looks like this:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
And it works totally fine when I use it as my .bashrc and bash.bashrc. Why is that?
No comments:
Post a Comment