Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!uwm.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jbn35564 From: jbn35564@uxa.cso.uiuc.edu (J.B. Nicholson) Newsgroups: comp.unix.shell Subject: Parameter expansion on program output in KSH Summary: Is it possible to use parameter expansion on program output w/o assigning a var? Keywords: KSH parameter expansion program output possible notation Message-ID: <1991Apr16.023454.2369@ux1.cso.uiuc.edu> Date: 16 Apr 91 02:34:54 GMT Sender: usenet@ux1.cso.uiuc.edu (News) Reply-To: jeffo@uiuc.edu Organization: University of Illinois at Urbana Lines: 20 Is it possible to use parameter expansion on program output w/o assigning a variable first? For example, is it possible to say something to the effect of: print ${$(hostname)%%.*} instead of: HOSTNAME=$(hostname) print ${HOSTNAME%%.*} Thanks. Jeff -- +----------------------------------------------------------------------------+ | "If you hear an onion ring - answer it." J.B. Nicholson | +----------------------------------------------------------------------------+ | jeffo@uiuc.edu (Internet) These opinions are mine, that's all.| +----------------------------------------------------------------------------+