Skip to content

Instantly share code, notes, and snippets.

@daudo
Created March 3, 2014 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daudo/9336560 to your computer and use it in GitHub Desktop.
Save daudo/9336560 to your computer and use it in GitHub Desktop.
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