I just found out about the bash extglob shell option here:- How can I use inverse or negative wildcards when pattern matching in a unix/linux shell?
All the answers
Being a Kornshell person, I have extglob
on in my .bashrc
by default because that's the way it is in Kornshell, and I use it a lot.
For example:
$ find !(target) -name "*.xml"
In Kornshell, this is no problem. In BASH, I need to set extglob
. I also set lithist
and set -o vi
. This allows me to use VI commands in using my shell history, and when I hit v
, it shows my code as a bunch of lines.
Without lithist
set:
for i in *;do;echo "I see $i";done
With listhist
set:
for i in *
do
echo "I see $i"
done
Now, only if BASH had the print
statement, I'd be all set.