Skip to content

Instantly share code, notes, and snippets.

@riywo
Last active December 11, 2015 14:49
Show Gist options
  • Save riywo/4617052 to your computer and use it in GitHub Desktop.
Save riywo/4617052 to your computer and use it in GitHub Desktop.
Exclude "/dev" and strings not explaining absolute file paths from a list with POSIX extended regexp
$ for i in no / /dev /boot /d /de /deva; do echo $i | grep -E '^/([^(dev)].+||d|de|dev.+)$' || echo "skip $i"; done
skip no
/
skip /dev
/boot
/d
/de
/deva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment