Skip to content

Instantly share code, notes, and snippets.

@dmarrazzo
Created October 14, 2015 11:30
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 dmarrazzo/f23ac1cb9b83fadd48be to your computer and use it in GitHub Desktop.
Save dmarrazzo/f23ac1cb9b83fadd48be to your computer and use it in GitHub Desktop.
bash regex example
for i in *; do if [[ $i =~ ^[0-9]{1,2}$ ]]; then echo $i; fi ; done
@dmarrazzo
Copy link
Author

How to list files that starts with 2 numbers. bash regex usage example.

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