|
|
1.1 ! root 1: .\" ENVIRONMENTS: COHERENT3 ! 2: .TH paste "" "" Command ! 3: .PC "Merge lines of files" ! 4: \fBpaste [ \-s ] [ \-d \fIlist\fB ] \fIfile ...\fR ! 5: .PP ! 6: .B paste ! 7: merges corresponding lines from multiple input files. ! 8: By default, ! 9: .B paste ! 10: uses the ! 11: .B <tab> ! 12: character to separate text from the files. ! 13: After merging lines from the input files, ! 14: .B paste ! 15: writes the resulting output to standard output, ! 16: thus allowing ! 17: .B paste ! 18: to be used in a shell pipeline. ! 19: .PP ! 20: If end-of-file is reached on any of the input files ! 21: while other files still contain data, ! 22: blank lines will be substituted as input. ! 23: .SH Options ! 24: .B paste ! 25: accepts the following options from the command line. ! 26: .RS ! 27: .IP "\fB-d \fIlist\fR" 0.4i ! 28: .br ! 29: Use the characters found in ! 30: .I list ! 31: to separate the output fields. ! 32: The characters in ! 33: .I list ! 34: are taken in sequence and used circularly, ! 35: i.e. taken in order until the end of ! 36: .I list ! 37: is reached, with a wrap-around back to the beginning of ! 38: .IR list . ! 39: Normally, ! 40: .B paste ! 41: uses the ! 42: .B <tab> ! 43: character to separate the output fields. ! 44: The following character sequences have special meaning when encountered in ! 45: .IR list : ! 46: .sp ! 47: \fB\e\e\fR output a single backslash character. ! 48: .br ! 49: \fB\et\fR output a ! 50: .B <tab> ! 51: character. ! 52: .br ! 53: \fB\en\fR output a ! 54: .B <newline> ! 55: character. ! 56: .br ! 57: \fB\e0\fR output a null string (i.e., no separator between output fields). ! 58: .sp ! 59: .IP \fB-s\fR ! 60: Output successive lines from each input ! 61: .I file ! 62: across the page, ! 63: with each input line separated from the next by a ! 64: .B <tab> ! 65: character. ! 66: After all input lines from a given file have been concatenated, ! 67: terminate the output line with a ! 68: .B <newline> ! 69: character and repeat the process on the next input file. ! 70: .RE ! 71: .SH Example ! 72: The following two files will be used for subsequent examples. ! 73: .B File1 ! 74: contains: ! 75: .ID ! 76: .ta 0.5i ! 77: File1_Line1 ! 78: File1_Line2 ! 79: File1_Line3 ! 80: File1_Line4 ! 81: .IE ! 82: .B File2 ! 83: contains: ! 84: .ID ! 85: .ta 0.5i ! 86: File2_Line1 ! 87: File2_Line2 ! 88: File2_Line3 ! 89: File2_Line4 ! 90: .IE ! 91: Given the command: ! 92: .ID ! 93: .ta 0.5i ! 94: paste File1 File2 ! 95: .IE ! 96: the resulting output would be: ! 97: .ID ! 98: .ta 0.5i 1.75i ! 99: File1_Line1 File2_Line1 ! 100: File1_Line2 File2_Line2 ! 101: File1_Line3 File2_Line3 ! 102: File1_Line4 File2_Line4 ! 103: .IE ! 104: Adding the option ! 105: .B \-s ! 106: yields the output: ! 107: .ID ! 108: .ta 0.5i 1.75i 3.0i 4.25i ! 109: File1_Line1 File1_Line2 File1_Line3 File1_Line4 ! 110: File2_Line1 File2_Line2 File2_Line3 File2_Line4 ! 111: .IE ! 112: .SH "See Also" ! 113: .B ! 114: commands, ! 115: cut ! 116: .R ! 117: .SH Author ! 118: .B paste ! 119: is copyright \f(MW!\fR 1989 ! 120: by The Regents of the University of California. ! 121: All rights reserved. ! 122: .PP ! 123: .B paste ! 124: is distributed as a service to COHERENT customers, as is. ! 125: It is not supported by Mark Williams Company. ! 126: .I "Caveat utilitor."
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.