forked from chenxofhit/Loc-PCA-CMI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tpl-generator.sh
25 lines (19 loc) · 774 Bytes
/
tpl-generator.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#author:[email protected]
#since 2017-04-27
#######################################################################################
#The script is to make use of `$1`.sh as template to produce subbash shell
#to run experiments on the server batchly
#######################################################################################
echo $1' sub networks generator start'
#tpl='main_bfgrn_mrnetb'
tpl=$1
templatebash=$tpl'.sh'
ext=${templatebash##*.}
subbash[0]="10"
subbash[1]="50"
subbash[2]="100"
sed 's/10/'${subbash[0]}'/g' $templatebash > $tpl${subbash[0]}"."$ext
sed 's/10/'${subbash[1]}'/g' $templatebash > $tpl${subbash[1]}"."$ext
sed 's/10/'${subbash[2]}'/g' $templatebash > $tpl${subbash[2]}"."$ext
echo $1' sub networks generator end'