Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!rutgers!mcdchg!illusion!marcus From: marcus@illusion.uucp (Marcus Hall) Newsgroups: comp.unix.shell Subject: Re: Parameter expansion on program output in KSH Keywords: KSH parameter expansion program output possible notation Message-ID: <1991Apr16.180017.7638@illusion.uucp> Date: 16 Apr 91 18:00:17 GMT References: <1991Apr16.023454.2369@ux1.cso.uiuc.edu> Reply-To: marcus@illusion.UUCP (Marcus Hall) Organization: Magic Numbers Software, Bloomingdale, IL Lines: 16 In article <1991Apr16.023454.2369@ux1.cso.uiuc.edu> jeffo@uiuc.edu writes: >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%%.*} Try: eval print \${$hostname%%.*} marcus hall