Skip to content

Commit

Permalink
update bin/sq (again)
Browse files Browse the repository at this point in the history
Issue 1391: Added a more generic way to get the proper scenario
directory via the scontrol command's "Command" descriptin.

Related to #1391.
  • Loading branch information
wwlwpd committed Sep 16, 2024
1 parent 6562e7a commit 5dbb223
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bin/sq
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ _sq() {
for status in $SQ; do
id=$(echo "$status" | awk '{print $1}')
runstate=$(echo "$status" | awk '{print $3}')
if [[ "$runstate" == "RUNNING" ]]; then
workdir=$(scontrol show job $id | grep WorkDir | awk -F/ '{print $(NF-2) "/" $(NF-1) "/" $NF}')
else
workdir=--
fi
workdir=$(scontrol show job $id | grep WorkDir | awk -F/ '{print $(NF-3) "/" $(NF-2) "/" $(NF-1)}')
echo $status $workdir | sed "s/^ *//g"
done
else
Expand Down

0 comments on commit 5dbb223

Please sign in to comment.