Next: 4.7 Where to find Up: 4 Using the programmes Previous: 4.5 Converting data
#!/bin/sh for number in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 do echo converting data$number.dat ./convert data$number.dat converted$number echo finished done
Another example of a shell script that may be useful to the user is the following which adds in the dimensions of the file (contained in dims.dat) to the data file (eg pion00.swap and outputs it to another file (eg pion00.dat:
#!/bin/sh for number in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 do echo pion$number.swap cat dims.dat pion$number.swap > pion$number.dat echo pion$number.dat done
These shell scripts will need to be altered to use the required input and output filenames.