🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1091

Re: How to do mv *.xyz *.abc in shell script??

#1091
From: Keith Pyle
Date: Fri, 07 Sep 1990 18:32
33 lines
1914 bytes
OK, so it's not done with the shell, but the program mmv posted to
comp.sources.unix (Volume 21, Issue 87) does this and a good deal more.
With mmv, the method would be:

mmv '*.xyz' '=1.abc'

Here's a bit of the man page:

NAME
     mmv - move/copy/append/link multiple files by wildcard  pat-
     terns

SYNOPSIS
     mmv [-m|x|r|c|o|a|l|s] [-h] [-d|p] [-g|t] [-v|n] [from to]

DESCRIPTION
     Mmv moves (or copies, appends, or links, as specified)  each
     source  file  matching  a  from  pattern  to the target name
     specified by the to pattern.  This multiple action  is  per-
     formed safely, i.e. without any unexpected deletion of files
     due to collisions of target names with existing filenames or
     with  other  target  names.   Furthermore, before doing any-
     thing, mmv attempts to detect any errors that  would  result
     from  the entire set of actions specified and gives the user
     the choice of either proceeding by  avoiding  the  offending
     parts or aborting.
-- 
-----------------------------------------------------------------------------
Keith Pyle                                UUCP: ...!cs.utexas.edu!execu!keith
Execucom Systems Corp., Austin, Texas     Internet: keith@execu.com
"It's 10 o'clock.  Do you know where      Disclaimer: What??
   your child processes are?"                  You actually believed me?
-----------------------------------------------------------------------------
Technical Details
Message-ID: <23989@sequoia.execu.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!execu!sequoia!keith
References: <5569@minyos.xx.rmit.oz> <975@ria.ccs.uwo.ca> <MCDANIEL.90Sep7110028@dolphin.adi.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!execu!sequoia!keith
From: keith@sequoia.execu.com (Keith Pyle)
Newsgroups: comp.unix.shell
Subject: Re: How to do mv *.xyz *.abc in shell script??
Message-ID: <23989@sequoia.execu.com>
Date: 7 Sep 90 18:32:08 GMT
References: <5569@minyos.xx.rmit.oz> <975@ria.ccs.uwo.ca> <MCDANIEL.90Sep7110028@dolphin.adi.com>
Organization: Execucom Systems Corp.
Lines: 33