The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 09-25-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
This will make five copies of xsec.1.11, five copies of xsec.2.11 and five copies of xsec.3.11. Hopefully this will be enough to get you started?
Code:
for file in xsec.1 xsec.2 xsec.3
do
  for num in 12 13 14 15 16
  do
    cp ${file}.11 ${file}.${num}
  done
done
Sing out if it's still confusing or not what you meant

edit: oops, that'll teach me to open multipl threads at once then get distracted

Last edited by Smiling Dragon; 09-25-2008 at 02:47 AM.. Reason: Just seen era's answered already