Skip to content

Commit

Permalink
Merge pull request #235 from KaushikMalapati/shellcheck_archive_resume
Browse files Browse the repository at this point in the history
Quoting variable and replacing echo with printf
  • Loading branch information
KaushikMalapati authored Feb 12, 2025
2 parents 16b4f8f + de8452d commit 9dedf51
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/archive-resume
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ if [[ -z $1 ]]; then
usage
exit 1
fi

if [[ ($1 == "--help") || ($1 == "-h") ]]; then
usage
exit 0
fi

result=$(curl -s "http://pscaa01.slac.stanford.edu:17665/mgmt/bpl/resumeArchivingPV?pv=$1")
echo
echo $result | cut -d'{' -f2 | cut -d '}' -f1 | tr ',' '\n'
echo
formatted_result=$(echo "$result" | cut -d'{' -f2 | cut -d '}' -f1 | tr ',' '\n')
printf "\n%s\n" "$formatted_result"

0 comments on commit 9dedf51

Please sign in to comment.