najmi@aku-PC ~/cuba
$ touch ayam.txt ayam.csv ayam.egg
najmi@aku-PC ~/cuba
$ for i in a*[!.csv,.txt];do echo $i;done
ayam.egg
$ touch ayam.txt ayam.csv ayam.egg
najmi@aku-PC ~/cuba
$ for i in a*[!.csv,.txt];do echo $i;done
ayam.egg
Here we use the popular ! mark to exclude the file extension within the brackets. Got the solution after few trials.
No comments:
Post a Comment