You are not logged in.
One of my scripts includes the command
ls "$d"*.@(avi|mp4|mkv|m4v|rmvb|divx|xvid)
which requires
shopt -s extglob for the ls command to work properly.
I have the shopt command in my .bashrc and normally all is well. But now I have set one of my computers to log me in and startx automatically and within an xterm also automatically run the script containing the fateful ls command, which bash rejects as a syntax error. Apparently X is using bash without sourcing my .bashrc.
I autorun the script in my .xinitrc with the command
xterm -g 113x59+550+0 -e /home/g/Scripts/movie.sh & I've tried including the shopt command in .xinitrc, .bash_profile and in startx, to no effect. But in any event none of those should have been necessary as /etc/profile sources /etc/bash.bashrc in which I have included a command to source my .bashrc so that my bash functions etc are available to me when working as root.
Where can I locate the shopt command so that it is in effect when X starts?
Last edited by porphyry5 (2014-09-21 18:04:22)
Offline
Put it in your script.
This silver ladybug at line 28...
Offline
Put it in your script.
Many thanks.
Offline