#! /bin/sh # xrdb-symbol-value --- get value of an xrdb symbol # Author: Noah Friedman # Created: 1995-04-05 # Public domain # $Id: xrdb-symbol-value,v 1.4 1999/10/15 15:40:13 friedman Exp $ # Commentary: # e.g.: xrdb-symbol-value SERVERHOST # -| nutrimat.gnu.ai.mit.edu # Code: case "${XRDB_SYMBOLS+set}" in set ) : ;; * ) # The -screen argument should limit the output to the current screen if # there is more than one; if the display does not refer to a specific # screen (e.g. set to ":0", then the default screen should be selected. # To get information about a different screen, set DISPLAY to that screen. XRDB_SYMBOLS="`xrdb -symbols -screen`" ;; esac while test $# -gt 0 ; do echo "$XRDB_SYMBOLS" \ | sed -n -e '/-D'"$1"'=/!d' \ -e 's/^-D[^=]*=//' \ -e 's/"//g' \ -e 's/[ ][ ]*/ /g' \ -e 's/^ //' \ -e 's/ $//' \ -e p -e q shift done # xrdb-symbol-value ends here