1234567891011121314151617181920212223242526272829 |
- #!/bin/csh
- # initial variables
- set maxFiles = 20
- set listDummy = "list_"
- #
- # main code
- set counter = 0
- set listCounter = 0
- set ListFile = "${listDummy}${listCounter}.list"
- touch $ListFile
- foreach line ( `cat $1` )
-
- @ counter += 1
-
- if ($counter == $maxFiles) then
- @ listCounter += 1
- set ListFile = "${listDummy}${listCounter}.list"
- touch $ListFile
- set counter = 0
- endif
- echo $line >> $ListFile
- end
|