PN(1)
π¦ PN(1) β the pn page, but make it make sense
okay so real talk: this is pn from section 1 of the General Commands Manual, and she is a whole command-line tool for phone number manipulation π
bestie you're gonna love her.
β¨ NAME β¨
pn β a command-line tool for phone number manipulation π
πΈ SYNOPSIS πΈ
pn COMMAND [OPTIONS] INPUT
like. command first. then options. then the actual input. that's the vibe π
π COMMANDS π
validβ tests whether the phone number you passed as INPUT is a valid number or a valid short number β¨. Returns0(SUCCESS) if the number is valid,1(ERROR) otherwise. Valid options here:-c,-v(verbose, default off).infoβ displays informations about the phone number given as INPUT π§ valid option:-conly.formatβ formats the telephone number given as INPUT to the standard you specify (E164 by default π), result lands on stdout. Valid options:-c,-f.findβ finds phone number(s) inside some text given as INPUT, result on stdout (one line per number found π). Valid options:-c,-f,-l.dialoutβ formats the phone number given as INPUT in e164 format, for out-of-country dialing purposes π valid options:-c,-l.
π₯ OPTIONS π₯
-c COUNTRY-CODEβ if you set this, the phone number(s) in INPUT get treated as if they were dialed from the country given by the 2 uppercase letters COUNTRY-CODE (e.g."FR","US", ...) π if you don't set it,pngoes looking for numbers in the international format instead. no cap.-f FORMATβ sets the phone number output format. FORMAT has to be one ofe164,int(international),nat(national), orteluri(RFC3966 tel URI) π the default value ise164.-l LENIENCYβ sets the phone number search leniency in INPUT. LENIENCY has to be one of these icons-only-iykyk levels: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's usually written for a number of this type. read that twice, it matters.strictβ phone numbers accepted are valid and 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. also: numbers with more than one/symbol in the national significant number get dropped at this level πexactβ phone numbers accepted are valid and grouped 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 β yes it's a libphonenumber thing, go read it, it ate π
π RETURN STATUS π
pn returns 0 on successful operations, and 1 if an error occurred (option error, parsing error) π that's it, that's the whole status situation.
π AUTHOR π
Camille Oudot <camille.oudot@orange.com> β icon, legend, the blueprint π
lowkey a heads up bestie:pnonly exists on this page as section 1 of the General Commands Manual β and the footer is justPN(1)again with no version or date attached anywhere π so if you were waiting for a copyright lineβ¦ there isn't one. bye bestie, go format some numbers πΈπ¦β¨
π¦ where this page comes from
- alpine 3.24: pn-doc 0.9.0-r48 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms