export SAC_DISPLAY_COPYRIGHT=0
5 cat con.lst_test | while read con
6 do
7 cat ${con}/event_PC | while read line
8 do
9 # arr_all=echo $line | gawk -F'["^#*" ]' '{print $2}' ${con}/p_arr_test
10 # st_all=echo $line | gawk -F'["^#*" ]' ' {print $1}' ${con}/p_arr_test
11 echo $line | gawk '$0~/^#/{getline;print $2}' ${con}/event_PC > arr
12
13 cat /home/yby/Desktop/SRC/arr | gawk '{print $0-10}' > cut_b.lst
14 cat /home/yby/Desktop/SRC/arr | gawk '{print $0+50}' > cut_e.lst
15 done
16
17 # num_arr=$(cat /home/yby/Desktop/SRC/arr | wc -l)
18 # print $num_arr
19
20 cat -n /home/yby/Desktop/SRC/cut_b.lst | while read cut_b
21 do
22 echo aaaa $cut_b $cut_e
23 b_time=`echo $cut_b | gawk '{print $2-50}'`
24 cut_e=`echo ${cut_b} | gawk '{print $2+100}'`
25 evt_id=`echo $cut_b | gawk '{print $1}'`
26 mkdir /home/yby/Desktop/data/AE_2023/event/0077/$evt_id
27 sac << EOF
28 cut ${b_time} ${cut_e}
29 r ${con}/00?.sac
30 w over Dir /home/yby/Desktop/data/AE_2023/event/0077/$evt_id
31 q
32 EOF
33 done
34 done
con中逐行读取了文件0001——0514,怎么样在26行和30行分别让con中读出来的文件执行后一一对应存到里面啊
相似问题