pu(1)
β¨ NAME β¨
physicalunits β bestie, this is the glow-up for encoding and de-coding physical units according to ISO/IEEE 11073-10101:2004 Tables A6.1 and A6.3. π
Also, fun lil lore drop: physicalunits used to go by the name pu. She's rebranded, but the old name still hits. π
π SYNOPSIS π
physicalunits [units_or_codes]
π¦ DESCRIPTION π¦
Okay so here's the tea β β the output hands you back a whole little lineup, and it looks exactly like this:
<physical unit> : <TAB> <decimal code> : <TAB> <hexadecimal code> : <TAB> <scaling> : <TAB> <physical unit w/o prefix>
β¦where <TAB> is literally just the character ascii(9). No cap. π«Ά
π Examples
Encoding "microVolts", using text representation, decimal encoding and hexadecimal encoding β look at her go:
physicalunits mV
uV 4275 0x10b3 1e-06 V
physicalunits 4275
uV 4275 0x10b3 1e-06 V
physicalunits 0x10b3
uV 4275 0x10b3 1e-06 V
Text representation containing spaces needs to be quoted, periodt:
physicalunits "kg l-1"
kg l-1 2051 0x0803 1000 g l-1
A list of units can be converted using multiple input arguments β yes bestie, you can feed her the whole squad at once:
physicalunits mV nA 4180 kg dag degree rpm "mol mol-1" "kg l-1"
mV 4274 0x10b2 0.001 V
nA 4180 0x1054 1e-09 A
nA 4180 0x1054 1e-09 A
kg 1731 0x06c3 1000 g
dag 1729 0x06c1 10 g
degree 736 0x02e0 1 degree
rpm 6816 0x1aa0 1 rpm
mol mol-1 864 0x0360 1 mol mol-1
kg l-1 2051 0x0803 1000 g l-1
And if you wanna see EVERYTHING, this one shows a complete table of defined units:
physicalunits `seq 0 65535` |grep -v nan |grep -v null
π AUTHOR π
Alois Schloegl π
π REPORTING BUGS π
Found a bug? Don't be shy, report it to <biosig-general@lists.sourceforge.net> π
π COPYRIGHT π
Copyright (C) 2008-2019 Alois Schloegl License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Not me being legally required to yell this: there is NO WARRANTY, to the extent permitted by law. She's free, she's open, she's giving community service. π
πΈ RESOURCES πΈ
https://biosig.sourceforge.io β go lurk, it's iconic. π
k bye, this was pu(1) from the General Commands Manual β section 1 forever, main character energy only. πβ¨
π¦ where this page comes from
- debian bookworm: biosig-tools 2.5.0-1+b1 Β· GPL-3.0-or-later
- debian trixie: biosig-tools 3.9.0-1 Β· GPL-3.0-or-later
- fedora 43: biosig4c++ 2.6.1-3.fc43 Β· GPL-3.0-or-later
- fedora 44: biosig4c++ 2.6.1-5.fc44 Β· GPL-3.0-or-later
- ubuntu jammy: biosig-tools 2.3.3-1build2 Β· GPL-3.0-or-later
- ubuntu noble: biosig-tools 2.6.0-1ubuntu1 Β· GPL-3.0-or-later
- ubuntu questing: biosig-tools 3.9.0-1
- ubuntu resolute: biosig-tools 3.9.0-1build3 Β· GPL-3.0-or-later
- ubuntu stonking: biosig-tools 3.9.5-1build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms