Date: Mon, 18 Aug 2008 14:53:53 GMT From: Konrad Jankowski <konrad@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 147729 for review Message-ID: <200808181453.m7IErrge055500@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=147729 Change 147729 by konrad@vspredator on 2008/08/18 14:53:30 More advanced version of cut.sh. Previous didn't work againsta all test files. Affected files ... .. //depot/projects/soc2008/konrad_collation/test/regression/cut.sh#2 edit Differences ... ==== //depot/projects/soc2008/konrad_collation/test/regression/cut.sh#2 (text+ko) ==== @@ -1,3 +1,12 @@ #!/bin/sh -printf '/coll\n.+4,$-3p\n' | ed -s $1 | sed -n -e '2,$p' +if [ "$1" = "" ]; then + echo "supply argument" + exit +fi + +LINE1=`awk '/coll/ { print FNR }' $1 | head -n 1` +LINE1=$(($LINE1+4)) +LINE2=`tail -n +$LINE1 $1 | awk '/result/ { print FNR }' | head -n 1` +LINE2=$(($LINE2-1)) +tail -n +$LINE1 $1 | head -n $LINE2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808181453.m7IErrge055500>