Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!motcid!minor From: minor@motcid.UUCP (Kevin E. Minor (+1 708 632 7043)) Newsgroups: comp.unix.shell Subject: Re: csh question (and ksh port maybe) Message-ID: <5130@opal18.UUCP> Date: 8 Nov 90 15:27:29 GMT References: <45969@sequent.UUCP> Organization: Motorola Inc., Cellular Infrastructure Div., Arlington Heights, IL Lines: 41 calvin@sequent.sequent.com (Calvin Goodrich) writes: |>can any of you unix.gods tell me what :e :h :t :r :q :x :gh :gt :gr |>stand for in csh? i've seen these used before but couldn't figure them out. |>for the rtfm'ers in the crowd: yes, i read the man pages on csh but couldn't |>get an informative answer. OK this is out of my little UNIX pocket handbook back when I was at school so if it's out of date or something... Sorry. Argument modifiers (follow argument selectors): :h Leave only the head of a pathname. :r Remove the extension of a pathname, leaving the root. :e Leave only the extension part of a pathname. :t Leave the tail of a pathname, removing leading components. (My favorite since I use it in my prompt - i.e. $cwd:t) :g[shret&] Repeat action of modifier globally. :q Quote substituted words to prevent further substitution. :x Like (q), but break into words at blanks, tabs, newlines. And here are the remainder modifiers - even though you didn't ask for them. :s/// Substitute string for string . :& Repeat previous expression. :p Print but do not execute. |>next question: do these things have an equivalent in ksh? apparently ksh |>doesn't have these little buggers. if they're useful i want to be able to |>use them in my favorite (imho, anyway) shell. Do know, I try to stay away from ksh... (Just my preference...) |>first person to give me a good answer to both questions gets a free cup of |>coffee at my company's cafeteria. :] Will ya fly me in too ???? :-) Kevin -- /-------------------------------------------------------\ | Kevin Minor ...uunet!motcid!minor | \-------------------------------------------------------/