-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbash_script
executable file
·57 lines (24 loc) · 1.61 KB
/
bash_script
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
touch foo{1..100}
for x in `cat file_list.txt` ; do cp /dsk2/fpi_data/pass2.use/ntup/sos$x.hbook .; done
for x in `ls sos*hbook`; do h2root $x; done
for x in `cat file_list.txt` ; do cp /dsk2/fpi_data/omega2/ntup/hms$x.hbook .; done
for x in `cat file_list.txt` ; do cp /dsk2/fpi_data/omega2/scalers/hms$x.txt .; done
for x in `ls hms*hbook`; do h2root $x; done
for x in `cat ../file_list.txt` ; do cp /dsk2/fpi_data/fpi2.scalers.old/gen$x.txt .; done
for x in `cat ../file_list.txt` ; do cp /dsk2/fpi_data/pass2.use/hms.tracktest/scalers/gen$x.txt .; done
for x in `ls` ; do h2root $x; done
cp /dsk2/fpi_data/omega2/scalers/*{47725..47735}.txt .
for x in `cat ../file_list.txt` ; do cp /dsk2/fpi_data/omega2/scalers/sos$x.txt .; done
while read line; do if ! grep -q ! <<< $line; then echo $line; fi; done < file_list.txt
while read line; do if ! grep -q ! <<< $line; then echo $line; fi; done < file_list.txt
while read line; do if [[ $line =~ \! ]]; then echo $line; fi; done < file_list.txt
while read line; do if [[ ! $line =~ \! ]]; then echo $line; fi; done < file_list.txt
while read line; do if [[ ! $line =~ \! ]]; then cp /dsk2/fpi_data/omega2/ntup/coin$line.hbook .; fi; done < ../file_list.txt
#----------------------------------------------------------
# Making the gif with image magic
convert -delay 20 -loop 0 *.png t2kpi_t2k_kpkm.gif
convert -delay 20 -loop 0 *.png t2kpi_t2k_kpkmpi0.gif
# Rename the end file per run!
for i in *.root; do newname=`echo $i | sed -e 's/\_[0-9]\+\.root$/_end.root/g'`; mv $i $newname; done
# Sum in a file
awk -F : '{acch+=$1;} ENDFILE { print acch; }' sum.txt