#!/bin/sh for i in /etc/X11/xorg.conf /etc/X11/xorg.conf-4 /etc/xorg.conf do if [[ -a "${i}" && -f "${i}" ]]; then xconf="${i}" fi done if [[ -a "${xconf}" && -f "${xconf}" ]]; then cat $xconf | while read i1 i2 i3 i4 ; do # Strip "\"" from I2 i2="${i2#\"}" ; i2="${i2%\"}" case "${i1}" in \#*) continue ;; 'Section') currsection="${i2}" ;; 'EndSection') currsection="" ;; 'FontPath') [ "$currsection" = "Files" ] && echo "${i2%:unscaled}" ;; esac done | egrep -v -i "tcp/|tcp4/|tcp6/|unix/" fi