Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!att!cbnews!mvadh From: mvadh@cbnews.att.com (andrew.d.hay) Newsgroups: comp.unix.shell Subject: Re: Ksh-88e shell array question Summary: a similar sample... Message-ID: <1990Dec19.130740.920@cbnews.att.com> Date: 19 Dec 90 13:07:40 GMT References: <9012190340.AA20465@lilac.berkeley.edu> Distribution: na Organization: AT&T Bell Laboratories Lines: 29 In article <9012190340.AA20465@lilac.berkeley.edu>, lwv27@CAS.BITNET writes: > I am attempting to turn a ksh variable into an array and then back > into the variable after manipulation. Here is what I have: > [] > > The problem is that I cannot figure out how to get the colons back into > the PATH. What I want to be able to do is to null out entries all together, > so they are not even present. What I would REALLY like to do is to > have something like an array 'shift' type mechanism I think! here's what i do with TERMCAP: set -A TERMCAP $(infocmp -C) typeset -i BIT=1 while [[ BIT -le ${#TERMCAP[@]} ]] do TERMCAP="${TERMCAP%:? }${TERMCAP[$BIT]} " (( BIT += 1 )) done set -A TERMCAP "$TERMCAP" export TERMCAP hope this helps... -- Andrew Hay +------------------------------------------------------+ Ragged Individualist | You just have _N_O idea! It's the difference | AT&T-BL Ward Hill MA | between _S_H_O_O_T_I_N_G a bullet and _T_H_R_O_W_I_N_G it! | a.d.hay@att.com +------------------------------------------------------+