PNC(1)
πΈ NAME πΈ
okay so bestie, meet pnc π β she's a command-line tool for phone number manipulation. And yes she lives in section 1 of the General Commands Manual, so she's a whole real one, no cap.
β¨ SYNOPSIS β¨
pnc COMMAND [OPTIONS] INPUT
like, command first, then options, then the input. that's the whole vibe π
π COMMANDS π
pick one, bestie, she doesn't do "all of the above":
validβ tests whether the phone number you passed asINPUTis a valid number or short number. Returns0(SUCCESS) if the number is valid,1(ERROR) otherwise. valid options here:-c,-v(verbose, default off). πinfoβ displays information about the phone number given asINPUT. valid option:-c. π¦formatβ formats a telephone number given asINPUTto the specified standard (E164by default), result goes on stdout. valid options:-c,-f. β¨findβ finds phone number in some text given asINPUT, result on stdout (one line per number found). valid options:-c,-f,-l. πdialoutβ formats a phone number given asINPUTine164format for out-of-country dialing purposes. valid options:-c,-l. π
π¦ OPTIONS π¦
-c COUNTRY-CODEβ if you set this, the phone number(s) given inINPUTwill be considered as being dialed from the country specified by the 2 uppercase lettersCOUNTRY-CODE(e.g."FR","US", ...). if you don't set it,pncwill look for numbers in the international format. π-f FORMATβ sets the phone number output format.FORMATmust be one ofe164,int(international),nat(national), orteluri(RFC3966 tel URI). the default value ise164. π-l LENIENCYβ sets the phone number search leniency inINPUT.LENIENCYmust be one of:possibleβ phone numbers accepted are possible, but not necessarily valid. πvalid(default value) β phone numbers accepted are possible and valid. numbers written in national format must have their national-prefix present if it is usually written for a number of this type.strictβ phone numbers accepted are valid and are grouped in a possible way for this locale. for example, a US number written as"65 02 53 00 00"and"650253 0000"are not accepted at this leniency level, whereas"650 253 0000","650 2530000"or"6502530000"are. numbers with more than one/symbol in the national significant number are also dropped at this level. πexactβ phone numbers accepted are valid and are grouped in the same way that we would have formatted it, or as a single block. for example, a US number written as"650 2530000"is not accepted at this leniency level, whereas"650 253 0000"or"6502530000"are. numbers with more than one/symbol are also dropped at this level. π
(see https://javadoc.io/doc/com.googlecode.libphonenumber/libphonenumber/8.4.1 for more details)
π RETURN STATUS π
pnc returns 0 on successful operations, 1 if an error occurred (option error, parsing error). that's it, that's the whole mood. π«Ά
π AUTHOR π
pnc is a fork of pn https://github.com/Orange-OpenSource/pn written by Camille Oudot <camille.oudot@orange.com> π
pnc is maintained by the Sxmo project: https://sxmo.org. you can find the source code at https://sxmo.org/source β¨
π COPYRIGHT π
original code (pn) used the Apache-2.0 license. Copyright (C) 2021 Camille Oudot <camille.oudot@orange.com> π
pnc is licensed under the GPL-3.0-only license. Copyright (C) 2022 Sxmo Contributors πΈ
this program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation π¦
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. β οΈ
you should have received a copy of the GNU General Public License along with this program. if not, see https://www.gnu.org/licenses/. π
and that's the whole page, bestie β straight from the PNC(1) page of the General Commands Manual. go forth and format some numbers, you absolute icon ππ
π¦ where this page comes from
- alpine 3.24: pnc-doc 0.9.5-r32 Β· GPL-3.0-only
- debian bookworm: pnc 0.9.4-3 Β· GPL-3.0-only
- debian trixie: pnc 0.9.4-3+b2 Β· GPL-3.0-only
- ubuntu noble: pnc 0.9.4-3build3 Β· GPL-3.0-only
- ubuntu questing: pnc 0.9.4-3build4
- ubuntu resolute: pnc 0.9.5-1build1 Β· GPL-3.0-only
- ubuntu stonking: pnc 0.9.5-1build1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms