Try in initally empty directory:
touch warm.data
(export LANG=en_US.UTF8 ; rm [A-Z]*.data )
ls warm.data
Ooops. But then your fix is not a fix.
mkdir tmp-test
cd tmptest
for f in a b c d e f g h i j k l m n o p q r s t u v w x y z; do touch
"$f$f$f".data; done
(export LANG=en_US.UTF-8; /bin/rm [A-Z]*.data)
ls
aaa.data
But the problem can be seen with the result of the following.
mkdir tmp-test
cd tmptest
for f in a b c d e f g h i j k l m n o p q r s t u v w x y z; do touch
"$f$f$f".data; done
(export LANG=en_US.UTF-8; /bin/rm [B-Z]*.data)
ls
aaa.data bbb.data
It's really strange that this with this glob anything is removed. :-(
Isn't that a bug? Globbing should work differently.
http://linux.about.com/library/cmd/blcmdl7_glob.htm
Oh, it looks like it is a bug (or feature) in bash.
/bin/dash
$ for f in a b c d e f g h i j k l m n o p q r s t u v w x y z; do touch
"$f$f$f".data; done
$
$ ls
aaa.data eee.data iii.data mmm.data qqq.data uuu.data yyy.data
bbb.data fff.data jjj.data nnn.data rrr.data vvv.data zzz.data
ccc.data ggg.data kkk.data ooo.data sss.data www.data
ddd.data hhh.data lll.data ppp.data ttt.data xxx.data
$ (export LANG=en_US.UTF-8; /bin/rm [A-Z]*.data)
/bin/rm: cannot remove `[A-Z]*.data': No such file or directory
$ ls
aaa.data eee.data iii.data mmm.data qqq.data uuu.data yyy.data
bbb.data fff.data jjj.data nnn.data rrr.data vvv.data zzz.data
ccc.data ggg.data kkk.data ooo.data sss.data www.data
ddd.data hhh.data lll.data ppp.data ttt.data xxx.data
As a fix for bash, you'd simply have to put some quotes around the glob
pattern.
for f in a b c d e f g h i j k l m n o p q r s t u v w x y z; do touch
"$f$f$f".data; done
(export LANG=en_US.UTF-8; /bin/rm "[A-Z]*.data")
/bin/rm: cannot remove `[A-Z]*.data': No such file or directory
trex:~/scratch/test-waldek>ls
aaa.data eee.data iii.data mmm.data qqq.data uuu.data yyy.data
bbb.data fff.data jjj.data nnn.data rrr.data vvv.data zzz.data
ccc.data ggg.data kkk.data ooo.data sss.data www.data
ddd.data hhh.data lll.data ppp.data ttt.data xxx.data
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.