pricecharts

track prices of consumer electronics
Log | Files | Refs | README

commit 6a4e986e8c8277956e02505541c18d8cb2139ae1
parent 696c68eb3a85faa8694b752d7b55be29a8169c00
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Tue, 29 Sep 2015 22:49:19 -0600

stats.sh: use printf instead of echo

Diffstat:
Mstats.sh | 14+++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/stats.sh b/stats.sh @@ -1,12 +1,8 @@ -#!/bin/sh +#!/bin/ksh sql_cmd="sqlite3 /var/db/pricesloth/db" -echo -n "prices: " -$sql_cmd "select count(*) from prices;" -echo -n "products: " -$sql_cmd "select count(*) from products;" -echo -n "descriptions: " -$sql_cmd "select count(*) from descriptions;" -echo -n "retailers: " -$sql_cmd "select count(*) from retailers;" +printf "prices: %i\n" $($sql_cmd "select count(*) from prices;") +printf "products: %i\n" $($sql_cmd "select count(*) from products;") +printf "descriptions: %i\n" $($sql_cmd "select count(*) from descriptions;") +printf "retailers: %i\n" $($sql_cmd "select count(*) from retailers;")