Re: changing suffix

Ross Jordan <[email protected]>
Newsgroups gmane.user-groups.linux.ottawa.general
Message-ID <[email protected]>
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
> [email protected]
> http://oclug.on.ca/mailman/listinfo/oclug
-- 
OCLUG general discussion list
[email protected]
http://oclug.on.ca/mailman/listinfo/oclug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.