FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit f772230d authored by Vitor Trovisco's avatar Vitor Trovisco
Browse files

Update delete_pub_list.sh - improved commenting

parent 514cd58e
No related branches found
No related tags found
1 merge request!22Update delete_pub_list.sh - improved commenting
......@@ -12,17 +12,18 @@ sudo ./canto/script/canto_docker ./script/canto_delete.pl --pub $(cat "${FILENAM
sed -n -e '/ /p' "temp_output.txt" > "temp_output1.txt"
sed 's/ //' "temp_output1.txt" > "temp_output2.txt"
#this will replace the odd character '/r' with a white-space and write the sessions list into the file "sessions_to_delete.txt"
# ('/r' characters would prevent sessions from being deleted, therefore they need to be deleted)
#the curs_key/ID output includes the the odd character '/r', which will block the deletion of curation sessions.
# the following lines will replace any odd character '/r' with a white-space and write the sessions list into the file "sessions_to_delete.txt"
FILENAME1="temp_output2.txt"
SESS_DEL=$(cat "${FILENAME1}")
echo ${SESS_DEL} | tr '\r' ' ' > "sessions_to_delete.txt"
#the following lines will a) 1st remove all sessions and b) repeat the command to delete the original list of publications
#the following lines a) remove all sessions in 'sessions_to_delete.txt' and b) repeat the original command to delete the initial list of publications in 'PMID_to_delete.tsv'
FILENAME2="sessions_to_delete.txt"
sudo ./canto/script/canto_docker ./script/canto_delete.pl --curs $(cat "${FILENAME2}")
sudo ./canto/script/canto_docker ./script/canto_delete.pl --pub $(cat "${FILENAME}")
#the following cleanup the temporary files created by the script
rm "temp_output.txt"
rm "temp_output1.txt"
rm "temp_output2.txt"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment