Parameter expansion on program output in KSH
    Marcus Hall 
    marcus at illusion.uucp
       
    Wed Apr 17 04:00:17 AEST 1991
    
    
  
In article <1991Apr16.023454.2369 at ux1.cso.uiuc.edu> jeffo at 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
    
    
More information about the Comp.unix.shell
mailing list