Open Web Solutions: WebGis, Open Source development
  • Home
  • Web Portfolio
  • About us
  • Contacts
  • language:
  • english
  • italiano

Finding unique CSS colors with grep and perl

2012-02-14 by Alessandro Pasotti filed under Tech, Web Development. Tags: Web Development
Just a tiny one-liner I’ve found useful to get unique CSS color values in a style sheet:
egrep -r '#[a-fA-F0-9]{3,6}+(\s|;)' *.css|perl -ne 'if (m/(#[a-fA-F0-9]{3,6}+)(\s|;)/){print "$1\n";}'|sort|uniq
Suggestions and improvements are welcome!
It's only fair to share...Tweet about this on Twitter
Twitter
Share on Facebook
Facebook
Share on LinkedIn
Linkedin
Pin on Pinterest
Pinterest
Share on Reddit
Reddit
Share on Google+
Google+

Categories

  • GIS (48)
    • QGIS (37)
      • QGIS Server (13)
  • Linux (47)
    • Linux Embedded (20)
      • N770 Pills (14)
      • N800 Pills (6)
      • N810 Pills (1)
    • Linux games (1)
    • Sysadmin (6)
  • Realizzazioni (2)
  • Tech (32)
  • Varie (24)
  • Products (1)
  • Accessibility (21)
  • Programming (116)
    • Arduino (11)
    • AVR MCU (4)
    • JavaScript (9)
      • GeoExt (2)
    • Joomla (36)
    • MSP430 MCU (6)
    • PHP (12)
    • Python (27)
      • Django (9)
      • OpenERP (1)
    • Server Side (12)
    • Web Development (6)
    • WebGis (29)
      • Mapserver e mapscript (14)

GIS

  • GFOSS.it
  • GRASS

Linux

  • Linux.it

Partner

  • NetGis “Mapping the web”
  • Robaminima

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

ItOpen.it is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! logo is used under a limited license granted by Open Source Matter the trademark holder in the USA and other countries.


P.I. 04091660961

© Open Web Solutions, GIS & Python Development - Cookies policy