This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Name

field - extract fields from a file

SYNOPSIS

field [-h] [-f FILE] [-d DELIMITER] [FIELD ...]

DESCRIPTION

field extracts a list of fields from a file. It is a simpler version of:

awk '{ print $5,$3,$1; }'

and similar scripts. Whitespace delimited (space and tab) fields are read from stdin and written to stdout.

FIELD is assumed to be 1-indexed integer, separated by commas and/or spaces, and take the following form:

N a single field.

N-M a range of increasing or decreasing fields from N to M.

-h, –help
show concise list of options and exit
–version
display version information and exit
-f, –file FILE
an explicit file to extract fields
-d, –delimiter DELIMITER
character delimiter between fields

NOTES

Field was written to address two short comings of cut:

  1. Default Behavior

    The default delimiter of cut is tab. Most command line utilities produce output delimited by whitespace, which includes spaces. Field takes this into account and defaults the delimiter to both tab and space characters.

  2. Field Ordering

    Fields extracted by cut are not listed in the order they are passed.

EXAMPLES

$ mount | field 5 3 1
ext4 / /dev/mapper/sda7_crypt
proc /proc proc
sysfs /sys sysfs
$ ls -l /usr/local/bin/ | field 1 9
-rwxr-xr-x airbrake*
-rwxr-xr-x bayes.rb*
-rwxr-xr-x bourbon*
$ cat /etc/mtab | cut -d' ' -f 4 | field -d',' 1 4 3 2
rw gid=5 nosuid noexec
rw size=10% nosuid noexec
rw nodev nosuid noexec
rw user=root nodev nosuid

AUTHOR

Written by Trevor Bramwell.

CHANGELOG

0.2.0

  • field arguments can be now be listed as either a single field, or an increasing or decreasing range.
  • Manpage included with package.
  • Added -v, --version option for displaying version and license information.
  • Changed -h, --help option to display better usage and include license.

0.1.0

  • Initial Release
  • fields can be extracted from stdin or explicit files.
  • Added -f, --file, -d, --delimiter, and -h, --help options.
Release History

Release History

0.2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
field-0.2.0-py2-none-any.whl (7.9 kB) Copy SHA256 Checksum SHA256 py2 Wheel Apr 8, 2015
field-0.2.0.tar.gz (18.3 kB) Copy SHA256 Checksum SHA256 Source Apr 8, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting