Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 May 2000 04:38:46 +0000
From:      Darren Wyn Rees <merlin@netlink.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   'pr' problem
Message-ID:  <20000513043846.D84340@netlink.co.uk>

next in thread | raw e-mail | index | archive | help
I'm having difficulty getting the 'pr' util
to work (as I was used to it, using Linux).
I have a small plain text database and a shell

	1|[a]|and, with, whether|0|1
	2|[ab]|a son; [a^b] an ape|1|1

script which formats that database.

#!/usr/local/bin/bash
#
# gcodo - prosesu geiriadur cymraeg y canol oesoedd
#
# gcodo < ffeil
#
# ee. ffeil

while read llinell; 
do
	one=`echo $llinell | cut -f2 -d"|"`
	two=`echo $llinell | cut -f3 -d"|"`
	echo -e $one\\c >> /tmp/one.$$
	echo -e "to $two\c" >> /tmp/two.$$
	fold -w27 /tmp/one.$$  >> /tmp/un.$$
	fold -w35 /tmp/two.$$  >> /tmp/dau.$$
	pr -m -t -w75 /tmp/un.$$ /tmp/dau.$$ 
	echo -e "-----------------------------------------------\c"
	rm /tmp/one.$$ /tmp/two.$$ /tmp/un.$$ /tmp/dau.$$ 
	echo
done

The Linux pr didn't split words :

-----------------------------------------------------------------
[abad]				  an abbott; [abades] an
				  abbess; [abadaeth] an
				  abbotship; [abaty] an abbey
-----------------------------------------------------------------

The FreeBSD pr does :
-----------------------------------------------------------------
[abad]				      an abbott; [abades] an abbess;
				       [abadaeth] an abbotship;	[aba
				      ty] an abbey
-----------------------------------------------------------------

I've read the man pages.  Please, no suggestions to use perl :-)
Thanks for any useful input !

	Darren


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000513043846.D84340>