Skip to main content

List symbols in input

Project description

syms

syms lists symbols in its input (where "symbol" can be defined flexibly enough to be words, identifiers or XML tags).

syms is distributed under the terms of the GNU General Public License; either version 3 of the License, or (at your option), any later version. See the file COPYING for more details.

Usage examples

Unique symbols, sorted lexically: syms "$@" | sort | uniq
Number of unique symbols: syms "$@" | sort | uniq | wc -l
Unique symbols, sorted by frequency: syms "$@" | sort | uniq -c | sort -n -k 2
Unique lines (like uniq, but not just adjacent lines): syms -s "^(.*)$" "$@"

usage: syms [-h] [-s REGEXP] [-V] [FILE ...]

List symbols in input.

positional arguments:
  FILE

options:
  -h, --help            show this help message and exit
  -s REGEXP, --symbol REGEXP
                        symbols are given by REGEXP
  -V, --version         show program's version number and exit

The default symbol type is words (-s "\p{L}+"); other useful settings
include:

  non-white-space characters: -s "\S+"
  alphanumerics and underscores: -s "\w+"
  XML tags: -s "<([a-zA-Z_:][a-zA-Z_:.0-9-]*)[\s>]"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syms-1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syms-1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file syms-1.0.tar.gz.

File metadata

  • Download URL: syms-1.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.4

File hashes

Hashes for syms-1.0.tar.gz
Algorithm Hash digest
SHA256 0519291a40ba2ec7b0c3bce43d6b25cc3bc663a36e444bbdf640de720fdbaa7e
MD5 603374a31e5bd4c41133e05e88f0fb07
BLAKE2b-256 12344fb074e26f11b691be5b084cc6ea6e16387724dfb46436b87c4115536c10

See more details on using hashes here.

File details

Details for the file syms-1.0-py3-none-any.whl.

File metadata

  • Download URL: syms-1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.4

File hashes

Hashes for syms-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b98b5997530303ebf788a73886b115b2fc15b728e44d171597c640e7a5cd7a2
MD5 7526e304cb0e92ae86c41133b0f5d976
BLAKE2b-256 f06e31019a273b16280c8b20d99e964dc607ac2ae0bf467bea70817bb7750c8a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page