Skip to content
markusle edited this page Sep 13, 2010 · 2 revisions
Manpage of pasty

pasty


Section: pasty (1)
Updated: Dec 2008
Index
 

NAME

pasty – A simple command line pasting utility
 

SYNOPSIS

pasty [column specifiers] file1 file2 …

 

DESCRIPTION

pasty is a simple commandline tool for pasting specific columns
from an arbitrary number of column centric ASCII input files into
a single output file. pasty currently expects the columns in the
input files to be separated by spaces (one or more).


 

OPTIONS

pasty currently only supports a single optional specifier, indicating
what columns to extract from each of the input files. Without the
specifier, pasty will paste complete rows for each file and the
output is then identical to coreutil’s paste command.






-i SEPARATOR


—insep SEPARATOR



Specify the

character used as separator for the input file
columns. The input separator is applied greedily, i.e., columns
separated by multiple instances of input separator are treated as
a single one. The default separator is a single whitespace character
(" ").





-o SEPARATOR


—outsep SEPARATOR



Specify the

string used as separator between the columns in the
output. Default is a single whitespace.
NOTE: In order to avoid that the shell interprets certain characters,
the string might need to be quoted.





-r PARSE_SPEC


—parsespecs PARSE_SPEC



Extract the columns specified in PARSE_SPEC for each file provided
on the command line. PARSE_SPEC is a colon separated list of
FILE_SPECs. FILE_SPEC is a comma separated list of zero based column
indices to be extracted for each input file and pasted into the output
file. Column indices larger than the number of columns are ignored and
the number of FILE_SPEC elements can be smaller than the total number
of input files. In this case, the last FILE_SPEC provided is used for
all remaining files. Without PARSE_SPEC, all columns are pasted
for each input file.





-w PASTE_SPEC


—pastespecs PASTE_SPEC



Paste the columns in the order given in PASTE_SPEC. PASTE_SPEC
is a comma separated list of zero based column indices (0 refers
to the first parsed column, 1 to the second parsed column, etc.).
PASTE_SPEC can list all parsed columns in any order and columns
may appear multiple times.


 

EXAMPLES

pasty file1 files

Paste all columns of file1 and file2 into the output file.

pasty -r 1,2:3 file1 file2

Paste columns 1,2 (zero based!) of file1 and column 3 of file2 into
the output file.

pasty -r 1,2:3 file1 file2 file3 file4

Paste columns 1,2 (zero based!) of file1 and column 3 of file2, file3
and file4 into the output file.

pasty -r 0 file1 file2 file3 file4

Paste the zeroth columns of file1, file2, file3, and file4 into the
output file.

pasty -r 0 -o :: file1 file2 file3 file4

Paste the zeroth columns of file1, file2, file3, and file4 into the
output file and separate the columns by a double colon.

pasty -r 0 -i : file1 file2 

Paste the zeroth columns of file1 and file2. The columns in each
file are assumed to be separated by any number of colons.

pasty -r 0,1 -w 3,2,1,0 file1 file2 

Read columns 0 and 1 from file1 and file2 and paste them in
reverse order.

pasty -r 0,1 -w 0,1,0,2,0,3 file1 file2 

Read columns 0 and 1 from file1 and file2 and paste
column 0 of file1 combined with column 1 file1 and
columns 0,1 of file2.

 

REPORTING BUGS

Please report bugs to <markusle@gmail.com>



 

COPYRIGHT AND LICENSE

pasty is released under the GPL version 3.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.


© 2008 Markus Dittrich



 

AUTHOR

Markus Dittrich <markusle@gmail.com>


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
REPORTING BUGS
COPYRIGHT AND LICENSE
AUTHOR

This document was created by man2html,
using the manual pages.

Time: 16:35:49 GMT, December 21, 2008