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.2.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: syms-1.0.2.tar.gz
  • Upload date:
  • Size: 14.4 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.2.tar.gz
Algorithm Hash digest
SHA256 f1f58361b8db1ae9aec36658c79863d3f566aea813551f73a730927b94973ae5
MD5 980b3b21c377ceb6532b3bfd7260f125
BLAKE2b-256 01c9ab9e5beb0092721d1804793b7fabe00d102eb3c6472ba8471381a853eb05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syms-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 152f5bc7b73cf06480c4542394434e0c3d0e7dd45506929054fe20beeac07a1c
MD5 87938016cc2e81ea017500791f1cbfeb
BLAKE2b-256 f63934b2897deff54a8124b2b3f5b57f84613f59750d52a3c032a60c9705c6a3

See more details on using hashes here.

Supported by

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