Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

The Insider's Guide to Accessing NLM Data

word-at-a-time


As new Insider's Guide classes are no longer being offered, this site is not currently being updated. Please refer to NCBI's E-utilities documentation for more up-to-date information.


The word-at-a-time command combines a series of Unix commands to parse a passage of text into individual lines, with each word appearing on its own line. The command also strips out any punctuation, and converts all uppercase text to lowercase. This command can be useful as a starting point for text-mining projects.

Input

A passage of text.

Output

The input text, with each word split onto its own line, all punctuation removed, and all uppercase letters converted to lowercase.

Arguments

The word-at-a-time command accepts no arguments.

Examples

Given the input text

We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America

the word-at-a-time command will output:

we
the
people
of
the
united
states
in
order
to
form
[...]

[...]
establish
this
constitution
for
the
united
states
of
america

Last Reviewed: July 30, 2021