The UNIX and Linux Forums  


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 -->
  #1 (permalink)  
Old 01-05-2009
sera1711 sera1711 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 1
csh formatted strings

Hi,

currently I'm trying to write a csh script that should do the following:

set i = 1
while ($i < 100) {
cp AAA BBB
set i = $i +1
}

where AAA is a string like this file.11.txt, file.21.txt, ...
and BBB is a string like this file_0001, file_0002, ...

Is it possible to generate the string AAA and BBB automatically from the variable i?

Every hint is appreciated!
Kind regards,
Sebastian.