> this is actually more a question, less a bug. But help would be
> appreciated...
>
> I'm having some trouble with a script:
>
> $FILE (contains recvq/fax00044.tif, for example. the number rises by 1,
> everytime a fax is recieved)
> I want to change the value of $FILE(recvq/fax00044.tif) to
> recvq/someuser/fax00044.tif.....
> Since there is no way to change $FILE's value, there must be some special
> wordsplit function or so........
If you can guarantee that there will be only a single slash, you can use
FILE1=${FILE%%/*}/someuser/${FILE##*/}
If not, you can set IFS=/, split $FILE, and pick out the parts you need.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/