[oclug] changing suffix
Ross Jordan
rjordan at numb.ca
Mon Jun 14 18:40:18 EDT 2010
The way I often do these kinds of moves is to generate a script.
i.e.
echo ls -1 > rnsuf.tmp
sed 's/\(.*\)\(\.a\.bl\)/mv \1\2 \1.b' < rnsuf.tmp > rnsuf.sh
(manually verify the script looks good; add #!/bin/bash to beginning)
chmod a+x rnsuf.sh
./rnsuf.sh
-Ross
It would seem James, on Mon, Jun 14, 2010 at 05:59:09PM -0400, wrote:
> I am trying tro change the suffix of files that end in .a.b to .b
>
> I tried (to echo first):
> for f in *\.a\.bl; do echo ${f#\.a\}.b; done
>
> --
> OCLUG general discussion list
> OCLUG at lists.oclug.on.ca
> http://oclug.on.ca/mailman/listinfo/oclug
More information about the OCLUG
mailing list