Skip to content

Commit

Permalink
refactor: use bash string substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
mortonne committed Jan 26, 2022
1 parent 334af15 commit 20467d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/slaunch
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ for no in $nos; do
fi

# fill in subject ID and split commands
subj_command=$(echo "$command" | sed "s/{}/$subject/g" | sed "s/{s}/$subject/g")
subj_command=${command/\{\}/$subject}
subj_command=${subj_command/\{s\}/$subject}
echo "$subj_command"

if [[ $test = false ]]; then
Expand Down

0 comments on commit 20467d1

Please sign in to comment.