On Wednesday 30 January 2008 11:47:01 Tomasz Pala wrote: > On Wed, Jan 30, 2008 at 10:31:54 +0200, Elan Ruusamäe wrote: > > any suggestions how to make the counting proper for empty and non-empty > > list? > > > > with echo -n: > > $ echo -n /lib/modules/2.6.22.16-3/misc/nvidia.ko | wc -l > > 0 > > > > $ echo -n ""| wc -l > > 0 > > echo "" | while read line; do [ -n "$line" ] && echo $line; done | wc -l > 0 > > echo "asdasd" | while read line; do [ -n "$line" ] && echo $line; done | wc > -l 1
thanks. took different approach: if [ "$files" ]; then echo "$files" | wc -l fi -- glen _______________________________________________ pld-devel-en mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
