Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/p/paste.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/p/paste.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/p/paste.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/p/paste.html on line 8
Merges lines of given input files, and writes the resulting lines to standard output. (POSIX)
paste [-s] [-d list] file
Neutrino
- -d list
- Specifies that each character in the list is an element specifying a delimiter character. Unless a backslash character appears in list, each character in list is an element specifying a delimiter character. If a backslash character appears in list, the backslash character and one or more characters following it are an element specifying a special delimiter character, described below. These elements specify one or more delimiters to use, instead of the default tab, to replace the newline of the input lines. If the -s option is also specified:
- The last <newline> in a file isn't modified.
- The delimiter is reset to the first element of the list after each file operand is processed.
If the -s option is not specified:
- The <newline>s in the file specified by the last file operand can't be modified.
- The delimiter is reset to the first element of the list each time a line is processed from each file.
When a backslash character appears in list, the backslash character and the other characters that follow it are used
to represent these delimiter characters:
- \n represents a <newline>
- \t represents a <tab>
- \\ represents a backslash character
- \0 represents an empty string, not a NULL character. If a lower case or upper case “x” immediately follows \0, or any character defined by the LC_CTYPE digit keyword, the results are unspecified. For more information, see the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 7, Locale.
|
When the escape sequences of the list argument are used in a shell script, you must use single quotation marks; otherwise, the shell interprets the backslash character as a special character.
The input files must be text files. |
- -s
- Concatenates all lines of each separate input file in command line order. Except for the last line in each input file, the <newline> of every line is replaced with <tab>, unless otherwise specified by the -d option.
- file
- The pathname of an input file. Specifying “-” for one or more of the files uses the standard input, which is input read one line at a time for each instance of “-”.
For every file you name, the paste utility pastes columns
or fields from each line, concatenates them, and writes them to the
standard output.
By default, paste assumes the field delimiter character to be
tab. You can use the -d option to specify another delimiter.
The following are examples of the list argument:
- Write out a directory in three columns:
ls | paste - - -
- Combine pairs of lines from a file into single lines:
paste -s -d "\t\n" file
- 0
- Successful completion.
- >0
- An error occurred.
cut,
grep,
pr
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/p/paste.html on line 168
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/p/paste.html on line 168