Skip to content

Instantly share code, notes, and snippets.

@daudo
Created March 3, 2014 23:08
bash$ shopt -s extglob
bash$ ls -l /opt/too_many_files/!(confidential.txt)
secret.txt
top_secret.txt
public.txt
@ffledgling
Copy link

The comment in your blog -- http://riaschissl.bestsolution.at/2014/03/repost-howto-exclude-files-from-wildcard-matches-in-bash/ says that '!' behaviour is redefined, can you give an example of this? It doesn't seem like it modifies the behaviour when doing anything like !vim or sudo !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment