From owner-freebsd-doc Mon Jan 28 22:10:20 2002 Delivered-To: freebsd-doc@freebsd.org Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id 4C33137B400; Mon, 28 Jan 2002 22:09:50 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id E84EFBD3A; Mon, 28 Jan 2002 22:09:49 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id WAA24901; Mon, 28 Jan 2002 22:09:49 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id g0T6E0W01969; Mon, 28 Jan 2002 22:14:00 -0800 (PST) (envelope-from swear@blarg.net) To: Brian Astill Cc: freebsd-questions@FreeBSD.ORG, Roman Neuhauser , freebsd-doc@FreeBSD.ORG Subject: Re: A question from a convert from Windows to FreeBSD References: <200201260704.g0Q74u864537@fedde.littleton.co.us> <02012713091300.01261@BAPhD.gihon.org.au> <20020127155418.G32706@roman.mobil.cz> From: swear@blarg.net (Gary W. Swearingen) Date: 28 Jan 2002 22:14:00 -0800 In-Reply-To: <20020127155418.G32706@roman.mobil.cz> Message-ID: Lines: 63 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Roman Neuhauser writes: > > From: Brian Astill > > To: freebsd-questions@FreeBSD.ORG > > Subject: Re: A question from a convert from Windows to FreeBSD > > Date: Sun, 27 Jan 2002 13:09:13 +1030 > > > > On Saturday 26 January 2002 17:34, Chris Fedde wrote: > > > You might want to submit a patch to the FreeBSD Documentation project. > > > > Want? - Yes. Be capable of? - No. > > Sure you are capable of submitting patches to man pages. Here's a > short howto: > > 1. step: find the source file: I suggest: $ man -wa passwd /usr/share/man/cat1/passwd.1.gz (source: /usr/share/man/man1/passwd.1.gz) /usr/share/man/man5/passwd.5.gz And you might find this crummy script useful, at least the two echo lines near the bottom. (It'll probably work with first line changed to "sh" too). #!/bin/ksh ## This is ~/bin/prepare-man-for-pr ## Usage: prepare-man-for-pr [section number] command [section number] ## Comments use the example of shutdown command. ## WARNING: script makes bad assumption that all pages are compressed to .gz cd /tmp man -wa $@ echo "NOTICE: Check to see if it's a port (so no PR)." whereis $@ MANPAGE=$(man -w $@) ## Makes "/usr/share/man/man8/shutdown.8.gz". MANPAGE=${MANPAGE##* } MANPAGE=${MANPAGE%)} XXX=${MANPAGE##*/} ## Makes "shutdown.8.gz". NEW=${XXX%.*} ## Makes "shutdown.8". BEG=${NEW%.*} ## Makes "shutdown". END=${NEW##*.} ## Makes "8". OLD=$BEG..orig.$END rm -i /tmp/$XXX /tmp/$NEW /tmp/$OLD ## 2> /dev/null ## Remove "shutdown.8.gz", "shutdown.8" and "orig-shutdown.8" with query. zcat $MANPAGE > $OLD ## So we have somthing like "/tmp/shutdown.8". cp -p $OLD $NEW ## So we have something like "/tmp/shutdown.8" and "/tmp/orig-shutdown.8". echo "groff -mandoc -Tlatin1 /tmp/$NEW | less" echo "diff -u /tmp/$OLD /tmp/$NEW >|/tmp/diffpr" ## So it can be opened with mouse and for diffing after editing. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message