.TH PNC 1 .SH NAME pnc - a command-line tool for phone number manipulation .SH SYNOPSIS .B pnc .I COMMAND [\fIOPTIONS\fR] .I INPUT .SH COMMANDS .TP .B valid Tests whether the phone number given as \fIINPUT\fR is a valid number or short number. Returns \fB0\fR (SUCCESS) if the number is valid, \fB1\fR (ERROR) otherwise. Valid options: \fB-c\fR, \fB-v\fR (verbose, default off). .TP .B info Displays information about the phone number given as \fIINPUT\fR. Valid option: \fB-c\fR. .TP .B format Formats a telephone number given as \fIINPUT\fR to the specified standard (E164 by default), result on stdout. Valid options: \fB-c\fR, \fB-f\fR. .TP .B find Finds phone number in some text given as \fIINPUT\fR, result on stdout (one line per number found). Valid options: \fB-c\fR, \fB-f\fR, \fB-l\fR. .TP .B dialout Formats a phone number given as \fIINPUT\fR in \fBe164\fR format for out-of-country dialing purposes. Valid options: \fB-c\fR, \fB-l\fR. .SH OPTIONS .TP \fB-c\fR \fICOUNTRY\-CODE\fR If set, the phone number(s) given in \fIINPUT\fR will be considered as being dialed from the country specified by the 2 uppercase letters \fICOUNTRY\-CODE\fR (e.g. "FR", "US", ...). If this option is not set, \fBpnc\fR will look for numbers in the international format. .TP \fB-f\fR \fIFORMAT\fR Sets the phone number output format. \fIFORMAT\fR must be one of \fBe164\fR, \fBint\fR (international), \fBnat\fR (national), or \fBteluri\fR (RFC3966 tel URI). The default value is \fBe164\fR. .TP \fB-l\fR \fILENIENCY\fR Sets the phone number search leniency in \fIINPUT\fR. \fILENIENCY\fR must be one of: .RS .TP .B possible Phone numbers accepted are possible, but not necessarily valid. .TP .B 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. .TP .B 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. .TP .B 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) .RE .SH RETURN STATUS \fBpnc\fR returns 0 on successful operations, 1 if an error occurred (option error, parsing error). .SH AUTHOR pnc is a fork of pn written by Camille Oudot pnc is maintained by the Sxmo project: . You can find the source code at .SH COPYRIGHT Original code (pn) used the Apache-2.0 license. Copyright (C) 2021 Camille Oudot 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 .