From ca4a852229b5bad0009ce25d809f908c2780978f Mon Sep 17 00:00:00 2001 From: epochqwert Date: Mon, 18 May 2015 06:08:56 -0500 Subject: changed the use of wc -l to grep -c '^.*$' because for some reasons Linux and BSD can't agree on how to space the output. --- genheader.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'genheader.sh') diff --git a/genheader.sh b/genheader.sh index 8a253b7..5146af1 100755 --- a/genheader.sh +++ b/genheader.sh @@ -1,4 +1,4 @@ #!/bin/sh -L=$(wc -l libhashtable.c | tr -s ' ' | cut '-d ' -f2) +L=$(grep -c '^.*$' libhashtable.c) cat libhashtable.c | grep -A "$L" _A_ | grep -B "$L" _B_ | grep -v "_[AB]_" > hashtable.h cat libhashtable.c | grep '(.*) *{' | egrep -v 'switch|if|for|while' | sed 's/ {/;/' >> hashtable.h -- cgit v1.2.3