doc date 19990412
NAME
squeeze -- reduce adjacent repeated characters to single
characters
SYNOPSIS
squeeze [-c | --complement ] string_arg <_standard_redirection_>
DESCRIPTION
squeeze is part of the functionality of
tr
, split into a separate
command (along with
exchange
and
delete )
in cLIeNUX for clarity. squeeze "squeezes" repeated characters.
squeeze reduces sections of repeated characters from the
list specified by
string_arg in standard
input to single occurances of the character in standard output. string_arg
specifies a list of
ASCII characters.
Most characters may represent themselves, and there are
aliases for backslash escapes including octal ASCII values, "asciibetical"
ranges of characters like A-Z and named character classes. You'll have to
use \\ to specify a backslash, for example. See
tr
for the
details.
The complement switch causes the character set to be deleted to be all the
ASCII characters not specified by string_arg.
EXAMPLES
These examples are interactive use of Bash "here document" redirection
of standard input.
$squeeze ":;,." <<___
> ;;;;;;;;;;;;;,,,,,,,,,,aaaaaaaaanutimxnmtu
> ___
;,aaaaaaaaanutimxnmtu
$squeeze " " <<_bbb
> don't do it Dave
> _bbb
don't do it Dave
$squeeze "\n" <<___
> line
>
>
> nother line
> ___
line
nother line
(cat -s does a similar conversion.)
SEE ALSO
tr
exchange
delete
sed
awk/gawk
and GNU "info" on gawk,
dirname
basename
BUGS
I *just* hacked up the little mutant. It still gives on-line help for tr
with the --help switch.
RIGHTS
squeeze is a derived work of GNU tr. This seedoc is not. This document is
Copyright 1999 Richard Allen Hohensee. This seedoc is released for
redistribution only as part of an intact entire cLIeNUX Core.