-
Notifications
You must be signed in to change notification settings - Fork 1
working file for data backup #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| #!/bin/bash | ||
|
|
||
|
|
||
| storedir=/store/cpnr-data/RENE/Data/Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
대부분 경우 bash에서 변수는 대문자로 적어요.
storedir -> STOREDIR
|
|
||
| storedir=/store/cpnr-data/RENE/Data/Data | ||
|
|
||
| nPRD=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nPRD -> NPRD
| nPRD=0 | ||
|
|
||
| #for run in 1000 ;do | ||
| for run in {475..2223..1};do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run -> RUN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 하면 특정 run number에 대해서만 돌 것 같은데 일반화 할 수 있나요?
| if [ -f "$file" ]; then | ||
| found=1 | ||
|
|
||
| nPRD=`ls -l $dirname/PRD/* |wc -l` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NPRD 변수가 이 loop안에서 바뀌지만 사용되지는 않는 것 같아요. 의도한 건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
갯수만 세는 거라면 ls -l 에서 -l 옵션은 빼는 게 좋아요. newline을 붙이는 걸 명시하고 싶다면 -1 (숫자1) 을 넣으세요. -l 을 하게 되면 formatting을 하기 때문에 느려져요.
| done | ||
|
|
||
| dirname=$storedir/RAW/$run_str | ||
| nFADC=`ls -l $dirname/FADC* |wc -l` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ls -l 에서 -l 빼기.
| @@ -0,0 +1,45 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
파일명 짓는 방식은 동사->명사 식이 읽기 좋아요. check_presence_of_PRDfile.sh 또는 check_PRDfile_presence
| #fi | ||
|
|
||
| dirname_1=Data/RAW | ||
| dirname_2=Data_ssd/RAW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dirname_1 -> DIRNAME1, dirname_2 -> DIRNAME2 쪽이 나음.
| dirname_2=Data_ssd/RAW | ||
|
|
||
|
|
||
| for run in {1..2300..1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
런넘버 기준 일반화 가능한지.
data backup 과정에서 정리하기 위해 사용하는 파일들을 업로드 합니다
compare_folders.sh
delete_merged_file.sh
move_Dir2Dir.sh
count_FADC_SADC.sh : run 별로 FADC , SADC 파일이 몇개 있는지 확인
file_integrity_check.sh : 무결성 검사를 위한 파일
PRDfile_presence_check.sh