File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,8 @@ process submit_ids {
76
76
script:
77
77
"""
78
78
# create file with IDs (without URS)
79
- for i in $baseDir /workflows/litscan/submit/*.txt;do sed '/^URS/d' \$ i >> all_ids.txt;done
80
- tr A-Z a-z < all_ids.txt > all_ids_lower.txt
81
- sort all_ids_lower.txt | uniq > all_ids_sorted.txt
79
+ find $baseDir /workflows/litscan/submit/ -name "*.txt" -print0 | xargs -0 sed '/^URS/d' > all_ids.txt
80
+ tr A-Z a-z < all_ids.txt | sort -u > all_ids_sorted.txt
82
81
83
82
# get ids already scanned by LitScan (Expert DB ids only)
84
83
psql -v ON_ERROR_STOP=1 -c "COPY (SELECT job_id FROM litscan_job WHERE job_id not like 'urs%' ORDER BY job_id) TO STDOUT;" $PGDATABASE > old_ids.txt
@@ -115,9 +114,8 @@ process submit_urs {
115
114
script:
116
115
"""
117
116
# create file with URS only
118
- for i in $baseDir /workflows/litscan/submit/*.txt;do sed '/^URS/!d' \$ i >> output.txt;done
119
- tr a-z A-Z < output.txt > output_uppercase.txt
120
- sort output_uppercase.txt | uniq > urs.txt
117
+ find $baseDir /workflows/litscan/submit/ -name "*.txt" -print0 | xargs -0 sed '/^URS/!d' > output.txt
118
+ tr a-z A-Z < output.txt | sort -u > urs.txt
121
119
122
120
# get URS already scanned by LitScan
123
121
psql -v ON_ERROR_STOP=1 -c "COPY (SELECT job_id FROM litscan_job WHERE job_id like 'urs%' ORDER BY job_id) TO STDOUT;" $PGDATABASE > urs_lower.txt
You can’t perform that action at this time.
0 commit comments