Skip to content

Commit

Permalink
CQUT-17 'cqosgi' has lost last bundle
Browse files Browse the repository at this point in the history
* see #17
* when used with -m parameter wc -l command incorrectly count number of
  bundles (missing \n)
* when used without -m parameter (pretty printed format) there is
  a wrong total number of bundles shown in the header but the list
  itself is ok
  • Loading branch information
kitarek committed Oct 3, 2014
2 parents d2ed83c + 9542d69 commit 1876a17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ What's new in...
1.1.2
-----

* Fixed incorrect total number of bundles shown for cqosgi
* Fixed missing \n for cqosgi with -m option supplied
* Fixed the issue: https://github.com/Cognifide/CQ-Unix-Toolkit/issues/17

1.1.1
-----

Expand Down
4 changes: 2 additions & 2 deletions cqosgi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ symbolicName\":\"([^\"]+)\",\"category\":\"([^\"]*)\".*"
items=$(printf "%s" "${filtered_items}" \
| ${SEDX} "s#${REGEXP}#\1${TB}\6${TB}\4${TB}\5${TB}\2#"\
| sort -nk1 -t "${TB}")
total=$(printf "%s" "${items}" | wc -l | tr -d ' ')
total=$(printf "%s\n" "${items}" | wc -l | tr -d ' ')
if [ "${machine_friendly}" -eq 0 ]
then
printf "%s bundles\n\n" "${total}"
Expand All @@ -76,7 +76,7 @@ symbolicName\":\"([^\"]+)\",\"category\":\"([^\"]*)\".*"
fi
if [ "${machine_friendly}" -eq 1 ]
then
printf "%s" "${output}"
printf "%s\n" "${output}"
else
COLUMN=$(which column)
if [ ${?} -ne 0 -o -z "${COLUMN}" ]
Expand Down

0 comments on commit 1876a17

Please sign in to comment.