Oho! GNU-projektin ls-komennon lisäksi myöskin grep osaa värit:
`--colour[=WHEN]' `--color[=WHEN]' The matching string is surrounded by the marker specify in GREP_COLOR. WHEN may be `never', `always', or `auto'.
Eipä näytä ainaskaan /bin-hakemistossa löytyvän muita värit osaavia ohjelmia kuin ls ja grep:
juhtolv@heresy:/bin % for f in *(.) ; do ; if strings "$f" | grep -- --colour > /dev/null ; then ; echo $f ; fi ; done grep juhtolv@heresy:/bin % for f in *(.) ; do ; if strings "$f" | grep -- --color > /dev/null ; then ; echo $f ; fi ; done dir grep ls vdir
dir ja vdir ovat vain ls-komennon muunnoksia.
Tällaisia väriä tukeavia ohjelmia löytyi /usr/bin:nistä:
juhtolv@heresy:/usr/bin % for f in *(.) ; do ; if strings "$f" | grep -- --color > /dev/null ; then ; echo $f ; fi ; done dircolors enscript strings: fcronsighup: Lupa evätty less mc mikmod minicom pdmenu pod2text si juhtolv@heresy:/usr/bin % for f in *(.) ; do ; if strings "$f" | grep -- --colour > /dev/null ; then ; echo $f ; fi ; done dselect strings: fcronsighup: Lupa evätty grc unicode
Meenpä nukq.
Heräsin noin tunti sitten.