-
Notifications
You must be signed in to change notification settings - Fork 0
/
changeName.sh
executable file
·55 lines (51 loc) · 2.82 KB
/
changeName.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# list of names
OAname=(
ISO_BKG FEFABS P1_2Shell_MF_PMissShape_O
CA5 FEFCXH P3_2Shell_MF_Norm_O
CC_norm_nubar FEFCX P3_2Shell_MF_PMissShape_O
CC_norm_nu FEFINEL Pauli_Blocking_C_nubar
CC_MultiPi_norm_nubar FEFQEH Pauli_Blocking_C_nu
CC_MultiPi_norm_nu FEFQE Pauli_Blocking_O_nubar
MAQE Q2_norm_5 Pauli_Blocking_O_nu
MARES Q2_norm_6 PShell_MF_Norm_C
2p2h_Norm_C Q2_norm_7 PShell_MF_PMissShape_C
2p2h_Norm_O RES_Eb_C_numubar SRC_Norm_C
2p2h_Norm_Other RES_Eb_C_numu SRC_Norm_O
2p2h_shape_C_NN RES_Eb_O_numubar SShell_MF_Norm_C
2p2h_shape_C_np RES_Eb_O_numu SShell_MF_Norm_O
2p2h_shape_O_NN Optical_Potential_C SShell_MF_PMissShape_C
2p2h_shape_O_np Optical_Potential_O SShell_MF_PMissShape_O
PNNN_Shape P1_2Shell_MF_Norm_O Nucleon_FSI
)
Kenjname=(
BgSclRES PionFSI_AbsProb SF_P1_2Shell_MeanF_PMissShape_O
CA5RES PionFSI_CExHighMomProb SF_P3_2Shell_MeanF_Norm_O
CC_DIS_norm_nubar PionFSI_CExLowMomProb SF_P3_2Shell_MeanF_PMissShape_O
CC_DIS_norm_nu PionFSI_InelProb SF_PBTwkDial_Hybrid_C12_nubar
CC_MultiPi_norm_nubar PionFSI_QEHighMomProb SF_PBTwkDial_Hybrid_C12_nu
CC_MultiPi_norm_nu PionFSI_QELowMomProb SF_PBTwkDial_Hybrid_O16_nubar
MaCCQE QETwk_HighQ2Weight_1 SF_PBTwkDial_Hybrid_O16_nu
MaRES QETwk_HighQ2Weight_2 SF_PShell_MeanF_Norm_C
MECTwkDial_Norm_C12 QETwk_HighQ2Weight_3 SF_PShell_MeanF_PMissShape_C
MECTwkDial_Norm_O16 RES_Eb_C_numubar SF_SRC_Norm_C
MECTwkDial_Norm_Other RES_Eb_C_numu SF_SRC_Norm_O
MECTwkDial_PDDWeight_C12_NN RES_Eb_O_numubar SF_SShell_MeanF_Norm_C
MECTwkDial_PDDWeight_C12_np RES_Eb_O_numu SF_SShell_MeanF_Norm_O
MECTwkDial_PDDWeight_O16_NN SF_OptPotTwkDial_C12 SF_SShell_MeanF_PMissShape_C
MECTwkDial_PDDWeight_O16_np SF_OptPotTwkDial_O16 SF_SShell_MeanF_PMissShape_O
MECTwkDial_PNNN_Shape SF_P1_2Shell_MeanF_Norm_O TwkDial_FateNucleonFSI
)
# change name of files in given directory
i=0
ls $1
for name in ${Kenjname[*]};
#for name in ${OAname[*]};
do
#echo Rename $1*$name.root into $1splines_pmu_${OAname[i]}.root
mv $1*$name.root $1splines_pmu_${OAname[i]}.root
#mv $1*$name.root $1splines_pmu_${Kenjname[i]}.root
((i++))
done
echo ""
ls $1