aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/units/units.1
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b2c76c41be32)
* Tell the world how to convert gigabytes to bytes with units(1) easilyMateusz Piotrowski2020-03-171-5/+18
| | | | | | | | | | | | | | | | | | | | | | | It turns out that units(1) is not as horrible to use in scripts as I initially thought. When the --terse flag is combined with an appropriate output format (set via --output-format), units(1) is actually capable of producing very nice results. For example: units -o %0.f -t '4 gigabytes' bytes is is just going to print out the expected value of 4294967296. There is no time to waste. People have to know about it. I am adding an example for this at the top of the examples section because this is what users are most likely looking for. Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D24096 Notes: svn path=/head/; revision=359032
* units(1): Refactor the manual page and update usage informationMateusz Piotrowski2020-02-031-114/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to units.1: - Change the description to a more descriptive "conversion calculator". - Sort options. - Split the description into sections to make it easier to navigate the manual page. - Improve the description of various options. - Document the default value of the output format. - Use more mdoc macros for better readability. - Document the behavior of the PATH environmental variable. - Improve examples. - Add sections: EXIT STATUS, DIAGNOSTICS, and HISTORY. - Document that units(1) cannot convert negative values and it handles long unit lists poorly. - Update the documentation of the -V flag to match the implementation. units(1) prints its version and the units data file instead of its version and usage information. Changes to units.c: - Update usage information. - Sort longopts elements. This commit does not attempts to change the current behavior of units(1). What's left to do is probably defining a better versioning (at the moment units(1) always reports "FreeBSD units" as its version) and changing the behavior of the -V flag to only print version. Reviewed by: allanjude (earlier version), bcr Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D18977 Notes: svn path=/head/; revision=357449
* Correct a typo: was -> way.Glen Barber2019-01-211-1/+1
| | | | | | | | | Submitted by: Larry Hynes MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=343259
* Correct the -H longopt equivillantSevan Janiyan2017-08-121-2/+2
| | | | | | | | | | PR: 209876 Submitted by: <kdrakehp AT zoho DOT com> Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D11988 Notes: svn path=/head/; revision=322424
* Escape No to avoid confusion with the No macroBaptiste Daroussin2017-02-111-9/+9
| | | | | | | | Reported by: make manlint MFC after: 2 days Notes: svn path=/head/; revision=313664
* Bring a little more compability with GNU units 2.12Eitan Adler2016-04-211-0/+3
| | | | | | | | | | | | | | - notionally support a 'history file' flag. This doesn't do much now, but is there to prevent scripts written against GNU units from breaking - correctly gracefully quit rather than exit (this will make it easier to support a history file in the future) - remove the "t" flag from fopen which was there to support windows. We have not supported windows since at the latest, the introduction of capsicum. Notes: svn path=/head/; revision=298388
* Rename units.lib -> definitions.unitsEitan Adler2016-04-191-2/+2
| | | | | | | | - this matches GNU units 2.12 add ISO country codes from units 2.12 Notes: svn path=/head/; revision=298253
* units(1): Add support for output-formatEitan Adler2014-07-171-0/+4
| | | | | | | | Add support for the output-format argument. This also exposes subtle rounding differences between GNU units and our units. Notes: svn path=/head/; revision=268792
* units: Support start of line comments with '#'Eitan Adler2014-07-051-1/+1
| | | | | | | Modern GNU units(1) supports comments anywhere with '#' but take the easy route for now and at least support start of line # comments. Notes: svn path=/head/; revision=268278
* units(1): Add 'terse' supportEitan Adler2014-07-051-0/+4
| | | | | | | terse output is used when calling units from another script. Notes: svn path=/head/; revision=268277
* units(1): Add 'help' flagEitan Adler2014-07-041-0/+2
| | | | | | | | - Add support for --help for compatibility - Make usage() static Notes: svn path=/head/; revision=268271
* units(1): Fix man pageEitan Adler2014-07-041-3/+5
| | | | | | | | | Igor walks one way. I walked the other. Reported by: wblock Notes: svn path=/head/; revision=268270
* units(1): add long optionsEitan Adler2014-07-041-6/+6
| | | | | | | | | Things brings additional compatibility with units 2.10 Discussed with: wblock (man page) Notes: svn path=/head/; revision=268269
* use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-1/+1
| | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* units(1): Add v option: verboseEitan Adler2014-04-141-1/+3
| | | | | | | | | | For increased compatibility with GNU units: support a -v option which produces more verbose output when spitting out the answer. GNU -v does additional work in the version, information, and check output which we do not (yet?) replicate. Notes: svn path=/head/; revision=264470
* units(1): Add U optionEitan Adler2014-04-141-2/+7
| | | | | | | | For increased compatibility with GNU units: support a -U option which tests for the existence of the default units file and prints it to the screen. Notes: svn path=/head/; revision=264463
* units(1): make -V print version instead of -vEitan Adler2014-04-071-3/+3
| | | | | | | | | | | | | | | | | | The units program is likely little used. It is even less likely that a script will want the units program to print out its version number by passing -v. GNU units uses -V for version and -v for verbosity. Increase compatibility between these two versions (written by the same author) by switching our flag as well. Take this opportunity to remove bogus information about the version number and just call it 'FreeBSD units'. Discussed with: cperciva, rwatson Notes: svn path=/head/; revision=264216
* mdoc: terminate quoted strings.Joel Dahl2012-03-261-17/+17
| | | | | | | Reviewed by: brueffer Notes: svn path=/head/; revision=233510
* It seems when I added code for affine unit changes to units, IDavid Malone2011-09-151-3/+5
| | | | | | | | | | forgot to tell the man page we could now convert Celsius to Fahrenheit. Approved by: re (kib) MFC after: 1 month Notes: svn path=/head/; revision=225596
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* Sort sections.Ruslan Ermilov2005-01-181-7/+7
| | | | Notes: svn path=/head/; revision=140420
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-19/+40
| | | | Notes: svn path=/head/; revision=131491
* mdoc(7): Fixed list types.Ruslan Ermilov2004-07-021-2/+2
| | | | Notes: svn path=/head/; revision=131475
* Remove whitespace at EOL.Dima Dorfman2001-07-151-12/+12
| | | | Notes: svn path=/head/; revision=79755
* Reverse order of from and to in order to match reality.Doug Barton2001-04-251-1/+1
| | | | | | | | PR: 26631 Submitted by: Glenn Johnson, glennpj@charter.net Notes: svn path=/head/; revision=75941
* All temperature scales are centigrades. Use "Celsius" instead.Daniel C. Sobral2001-03-011-1/+1
| | | | Notes: svn path=/head/; revision=73259
* As far as I can tell, you have never been able to use 'ab' as a unitDavid Malone2000-12-241-1/+1
| | | | | | | name if 'a' and 'b' are unit names. You can use 'a b' though. Notes: svn path=/head/; revision=70338
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-191-17/+18
| | | | Notes: svn path=/head/; revision=70197
* mdoc(7) police: use certified section headers wherever possible.Ruslan Ermilov2000-11-171-2/+2
| | | | Notes: svn path=/head/; revision=68854
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.Philippe Charnier1998-03-231-2/+2
| | | | Notes: svn path=/head/; revision=34801
* Use err(3). Cosmetic in usage(). Rewrote man page in mdoc format.Philippe Charnier1997-08-211-80/+81
| | | | Notes: svn path=/head/; revision=28502
* Specify the full path of units.lib in the FILES section.Alexander Langer1997-05-061-2/+2
| | | | Notes: svn path=/head/; revision=25504
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23012
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Added revised manpage submitted by the author of units.Alexander Langer1996-06-101-26/+60
| | | | | | | | Reviewed by: alex Submitted by: Adrian Mariano <adrian@cam.cornell.edu> Notes: svn path=/head/; revision=16269
* Units conversion utility courtesy of NetBSD.Alexander Langer1996-06-081-0/+124
Submitted by: Jeremy Prior Obtained from: NetBSD Notes: svn path=/vendor/NetBSD/dist/; revision=16186