[qadmin@concon qw]$ ls -1 *REPT *ERR ls: *ERR: No such file or directory 353513_3.REPT 42342_12.REPT 442342_2.REPT [qadmin@concon qw]$ perl -e 'map{($a=$_)=~s/REPT/ERR/,rename($_,$a)}glob("*.REPT")' [qadmin@concon qw]$ ls -1 *REPT *ERR ls: *REPT: No such file or directory 353513_3.ERR 42342_12.ERR 442342_2.ERR [qadmin@concon qw]$