🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.misc
Article #3316

Re: adding file suffix

#3316
From: Todd A Green
Date: Tue, 10 Nov 1992 23:14
29 lines
1823 bytes
> Sherwood Botsford writes:
>Charles William Swiger writes
>> mv $f ${f:r}.tiff  <type return>
>
>What does the :r do?

From "man csh":

    The `:' separating the event specification from the word
     designator can be omitted if the argument selector begins
     with a `^', `$', `*' `-' or `%'.  After the optional word
     designator can be placed a sequence of modifiers, each pre-
     ceded by a `:'.  The following modifiers are defined:

          h      Remove a trailing pathname component, leaving the head.
          r      Remove a trailing `.xxx' component, leaving the root name.
          e      Remove all but the extension `.xxx' part.
          s/l/r/ Substitute l for r
          t      Remove all leading pathname components, leaving the tail.
          &      Repeat the previous substitution.
          g      Apply the change globally, prefixing the above, e.g. `g&'.
          p      Print the new command but do not execute it.
          q      Quote the substituted words, preventing further substitutions.
          x      Like q, but break into words at blanks, tabs and newlines.

Try reading the man pages before posting,
Todd
--
NeXTmail:  tagreen@cica.indiana.edu
Technical Details
Message-ID: <BxIwJH.K8p@usenet.ucs.indiana.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!lothario.cica.indiana.edu!tagreen
References: <oezPSP_00WBOA4CI0a@andrew.cmu.edu> <1992Nov10.184750.24693@kakwa.ucs.ualberta.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!lothario.cica.indiana.edu!tagreen
From: tagreen@lothario.cica.indiana.edu (Todd A Green)
Subject: Re: adding file suffix
Message-ID: <BxIwJH.K8p@usenet.ucs.indiana.edu>
Sender: news@usenet.ucs.indiana.edu (USENET News System)
Nntp-Posting-Host: lothario.cica.indiana.edu
Organization: CICA - Center for Innovative Computer Applications
References: <oezPSP_00WBOA4CI0a@andrew.cmu.edu> <1992Nov10.184750.24693@kakwa.ucs.ualberta.ca>
Date: Tue, 10 Nov 1992 23:14:04 GMT
Lines: 29