Wildcard expressions from the command line.

Brooke Besser brobes at auto-trol.UUCP
Fri Jan 5 03:58:41 AEST 1990


In the "ed" regular expressions, we are able to use a syntax to remember a
wildcard string as follows:

      /(.*\)

This syntax will remember the wildcard expression, and enable it to be used
with a "\#", where # is the position of the wildcard string in the regular
expression.

The problem is that this syntax cannot be used on the command line. This is
needed to be able to perform wildcard file manipulation. For example, if I
want to copy all files with a ".ftn" extension to a ".for" extension, how can
I copy these without writing a special shell script? If I could use the "ed"
regular wildcard expression, it would look like this:

     cp \(*\).ftn \1.for

Is there any way to do this from the command line?



More information about the Comp.unix.questions mailing list