.TH "pasty" "1" "Dec 2008" "pasty-0.1" "pasty" .SH "NAME" pasty \- A simple command line pasting utility .SH "SYNOPSIS" .B pasty .I [column specifiers] file1 file2 ... .PP .SH "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). .SH "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. .TP 4m .PD 0 \fI-i SEPARATOR .TP .PD \fI--insep SEPARATOR Specify the \fBcharacter\fR 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 (" "). .TP 4m .PD 0 \fI-o SEPARATOR .TP .PD \fI--outsep SEPARATOR Specify the \fBstring\fR 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. .TP 4m .PD 0 \fI-r PARSE_SPEC .TP .PD \fI--parsespecs PARSE_SPEC\fR 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. .TP 4m .PD 0 \fI-w PASTE_SPEC .TP .PD \fI--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. .SH "EXAMPLES" .nf .B pasty file1 files .fi Paste all columns of file1 and file2 into the output file. .PP .nf .B pasty -r 1,2:3 file1 file2 .fi Paste columns 1,2 (zero based!) of file1 and column 3 of file2 into the output file. .PP .nf .B pasty -r 1,2:3 file1 file2 file3 file4 .fi Paste columns 1,2 (zero based!) of file1 and column 3 of file2, file3 and file4 into the output file. .PP .nf .B pasty -r 0 file1 file2 file3 file4 .fi Paste the zeroth columns of file1, file2, file3, and file4 into the output file. .PP .nf .B pasty -r 0 -o "::" file1 file2 file3 file4 .fi Paste the zeroth columns of file1, file2, file3, and file4 into the output file and separate the columns by a double colon. .PP .nf .B pasty -r 0 -i : file1 file2 .fi Paste the zeroth columns of file1 and file2. The columns in each file are assumed to be separated by any number of colons. .PP .nf .B pasty -r 0,1 -w 3,2,1,0 file1 file2 .fi Read columns 0 and 1 from file1 and file2 and paste them in reverse order. .PP .PP .nf .B pasty -r 0,1 -w 0,1,0,2,0,3 file1 file2 .fi 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. .PP .SH "REPORTING BUGS" Please report bugs to .SH "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. (C) 2008 Markus Dittrich .SH "AUTHOR" .nf Markus Dittrich .fi