Path: utzoo!attcan!uunet!convex!kole From: kole@convex.com (John P. Kole) Newsgroups: comp.unix.shell Subject: Re: Built-in String Processing? Message-ID: <107803@convex.convex.com> Date: 28 Oct 90 04:30:33 GMT References: <1990Oct27.215051.14085@midway.uchicago.edu> Sender: usenet@convex.com Organization: Convex Computer Corporation, Richardson, Tx. Lines: 11 In article <1990Oct27.215051.14085@midway.uchicago.edu> phd_ivo@gsbacd.uchicago.edu writes: > ... > alias cd 'cd \!* && set prompt="\! ${cwd}> "' > ... >'/Users/u/ivo/subdir' etc. I would like to get rid of the first x characters of >the ${cwd} variable in this macro, i.e. display only 'subdir' ( or even better, >only if the string starts with '/Users/u/ivo' ). How would I do this? Try the ':t' modifier as follows: alias cd 'cd \!* && set prompt="\! ${cwd:t}> "'