accident in experiments : ls !a and ls ?a

accident in experiments

$ 4.2.20 8 507---> cat .bashrc
#export PS1="[ 33[0;31m] $ V # ! "
export PS1="$ V # !---> "

shellp()
{
pre=: post=:
printf "$pre%s$postn" "$@"
}

$ 4.2.20 9 508---> shopt -u extglob
accident fixme
$ 4.2.20 10 509---> ls ?a
NetworkSystemAdministration.pdf
$ 4.2.20 26 525---> pwd
/home/jeffrin
$ 4.2.20 27 526---> cd sa
$ 4.2.20 28 527---> pwd
/home/jeffrin/sa
$ 4.2.20 29 528---> ls
NetworkSystemAdministration.pdf
$ 4.2.20 30 529---> ls ?a
ls: cannot access ?a: No such file or directory
$ 4.2.20 31 530---> cd ..
$ 4.2.20 32 531---> pwd
/home/jeffrin
$ 4.2.20 33 532---> ls ?a
NetworkSystemAdministration.pdf
$ 4.2.20 34 533--->

$ 4.2.20 11 510---> ls ?b
bb
$ 4.2.20 12 511---> ls ?c
ls: cannot access ?c: No such file or directory
$ 4.2.20 13 512---> ls ?t
rt
$ 4.2.20 14 513---> ls ?a
NetworkSystemAdministration.pdf
$ 4.2.20 15 514---> shopt -s extglob
$ 4.2.20 16 515---> ls ?a
NetworkSystemAdministration.pdf
accident
$ 4.2.20 17 516---> ls !a
ls apropos "device driver"
ls: cannot access apropos: No such file or directory
ls: cannot access device driver: No such file or directory
$ 4.2.20 18 517---> shopt -u extglob
$ 4.2.20 19 518---> ls !a
ls apropos "device driver"
ls: cannot access apropos: No such file or directory
ls: cannot access device driver: No such file or directory
$ 4.2.20 20 519--->
 ! is a history expansion character in GNU bash

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s