Open
Conversation
jhgoh
reviewed
Jul 26, 2025
| #!/bin/bash | ||
|
|
||
|
|
||
| storedir=/store/cpnr-data/RENE/Data/Data |
Member
There was a problem hiding this comment.
대부분 경우 bash에서 변수는 대문자로 적어요.
storedir -> STOREDIR
|
|
||
| storedir=/store/cpnr-data/RENE/Data/Data | ||
|
|
||
| nPRD=0 |
| nPRD=0 | ||
|
|
||
| #for run in 1000 ;do | ||
| for run in {475..2223..1};do |
Member
There was a problem hiding this comment.
이렇게 하면 특정 run number에 대해서만 돌 것 같은데 일반화 할 수 있나요?
| if [ -f "$file" ]; then | ||
| found=1 | ||
|
|
||
| nPRD=`ls -l $dirname/PRD/* |wc -l` |
Member
There was a problem hiding this comment.
NPRD 변수가 이 loop안에서 바뀌지만 사용되지는 않는 것 같아요. 의도한 건가요?
Member
There was a problem hiding this comment.
갯수만 세는 거라면 ls -l 에서 -l 옵션은 빼는 게 좋아요. newline을 붙이는 걸 명시하고 싶다면 -1 (숫자1) 을 넣으세요. -l 을 하게 되면 formatting을 하기 때문에 느려져요.
| done | ||
|
|
||
| dirname=$storedir/RAW/$run_str | ||
| nFADC=`ls -l $dirname/FADC* |wc -l` |
| @@ -0,0 +1,45 @@ | |||
| #!/bin/bash | |||
Member
There was a problem hiding this comment.
파일명 짓는 방식은 동사->명사 식이 읽기 좋아요. check_presence_of_PRDfile.sh 또는 check_PRDfile_presence
| #fi | ||
|
|
||
| dirname_1=Data/RAW | ||
| dirname_2=Data_ssd/RAW |
Member
There was a problem hiding this comment.
dirname_1 -> DIRNAME1, dirname_2 -> DIRNAME2 쪽이 나음.
| dirname_2=Data_ssd/RAW | ||
|
|
||
|
|
||
| for run in {1..2300..1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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