7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept xml:lang="en" id="GUID-4911D998-5B1A-53E1-B1A7-920748489CD0"><title>print</title><prolog><metadata><keywords/></metadata></prolog><conbody><p><userinput>print [ -acilmnNoOPrsz ] [ -u n ] [ -f format ] [ -C cols ] [ -R [ -en ]] [ arg ... ] </userinput> </p> <p>With the <codeph>-f</codeph> option the arguments are printed as described by <xref href="GUID-6D59E35B-6572-519A-8CFD-CB7781DDE631.dita">printf</xref>. With no flags or with the flag <codeph>-</codeph>, the arguments are printed on the standard output as described by <xref href="GUID-728F278B-30C8-5FA8-AD03-4C759690416E.dita">echo</xref>, with the following differences: the escape sequence <codeph>\M-x</codeph> metafies the character <codeph>x</codeph> (sets the highest bit), <codeph>\C-x</codeph> produces a control character (<codeph>\C-@ </codeph> and <codeph>\C-?</codeph> give the characters NULL and delete), and <codeph>\E</codeph> is a synonym for <codeph>\e</codeph>. Finally, if not in an escape sequence, <codeph>\</codeph> escapes the following character and is not printed. </p> <table id="GUID-DD03FA46-A1EE-586E-9C0C-B5AF20B79E06"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>Option</entry> <entry>Description</entry> </row> </thead> <tbody><row><entry><p> <codeph>-a</codeph> </p> </entry> <entry><p>Prints the arguments with the column incrementing first. Only useful with the <codeph>-c </codeph> and <codeph>-C</codeph> options. </p> </entry> </row> <row><entry><p> <codeph>-c</codeph> </p> </entry> <entry><p>Print the arguments in columns. Unless <codeph>-a</codeph> is also given, arguments are printed with the row incrementing first. </p> </entry> </row> <row><entry><p> <codeph>-C cols </codeph> </p> </entry> <entry><p>Print the arguments in <codeph>cols</codeph> columns. Unless <codeph>-a</codeph> is also given, arguments are printed with the row incrementing first. </p> </entry> </row> <row><entry><p> <codeph>-i</codeph> </p> </entry> <entry><p>If given together with <codeph>-o</codeph> or <codeph>-O</codeph>, sorting is performed case-independently. </p> </entry> </row> <row><entry><p> <codeph>-l</codeph> </p> </entry> <entry><p>Print the arguments separated by newlines instead of spaces. </p> </entry> </row> <row><entry><p> <codeph>-m</codeph> </p> </entry> <entry><p>Take the first argument as a pattern (should be quoted), and remove it from the argument list together with subsequent arguments that do not match this pattern. </p> </entry> </row> <row><entry><p> <codeph>-n</codeph> </p> </entry> <entry><p>Do not add a newline to the output. </p> </entry> </row> <row><entry><p> <codeph>-N</codeph> </p> </entry> <entry><p>Print the arguments separated and terminated by nulls. </p> </entry> </row> <row><entry><p> <codeph>-o</codeph> </p> </entry> <entry><p>Print the arguments sorted in ascending order. </p> </entry> </row> <row><entry><p> <codeph>-O</codeph> </p> </entry> <entry><p>Print the arguments sorted in descending order. </p> </entry> </row> <row><entry><p> <codeph>-P</codeph> </p> </entry> <entry><p>Perform prompt expansion </p> </entry> </row> <row><entry><p> <codeph>-r</codeph> </p> </entry> <entry><p>Ignore the escape conventions of echo. </p> </entry> </row> <row><entry><p> <codeph>-R</codeph> </p> </entry> <entry><p>Emulate the BSD echo command, which does not process escape sequences unless the <codeph>-e</codeph> flag is given. The <codeph>-n</codeph> flag suppresses the trailing newline. Only the <codeph>-e</codeph> and <codeph>-n |
12 <concept id="GUID-4911D998-5B1A-53E1-B1A7-920748489CD0" xml:lang="en"><title>print</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 </codeph> flags are recognized after <codeph>-R</codeph>; all other arguments and options are printed. </p> </entry> </row> <row><entry><p> <codeph>-s</codeph> </p> </entry> <entry><p>Place the results in the history list instead of on the standard output. </p> </entry> </row> <row><entry><p> <codeph>-u n</codeph> </p> </entry> <entry><p>Print the arguments to file descriptor <codeph>n</codeph>. </p> </entry> </row> <row><entry><p> <codeph>-z</codeph> </p> </entry> <entry><p>Push the arguments onto the editing buffer stack, separated by spaces. </p> </entry> </row> </tbody> </tgroup> </table> <p>If any of <codeph>-m</codeph>, <codeph>-o</codeph> or <codeph>-O</codeph> are used in combination with <codeph>-f</codeph> and there are no arguments (after the removal process in the case of <codeph>-m</codeph>) then nothing is printed. </p> <p> <b>Note:</b> Symbian platform does not support the use of the <codeph>-b</codeph>, <codeph>-d</codeph>, and <codeph>-p</codeph> options. </p> </conbody></concept> |
13 <p><userinput>print [ -acilmnNoOPrsz ] [ -u n ] [ -f format ] [ -C cols ] |
|
14 [ -R [ -en ]] [ arg ... ] </userinput> </p> |
|
15 <p>With the <codeph>-f</codeph> option the arguments are printed as described |
|
16 by <xref href="GUID-6D59E35B-6572-519A-8CFD-CB7781DDE631.dita">printf</xref>. With |
|
17 no flags or with the flag <codeph>-</codeph>, the arguments are printed on |
|
18 the standard output as described by <xref href="GUID-728F278B-30C8-5FA8-AD03-4C759690416E.dita">echo</xref>, |
|
19 with the following differences: the escape sequence <codeph>\M-x</codeph> metafies |
|
20 the character <codeph>x</codeph> (sets the highest bit), <codeph>\C-x</codeph> produces |
|
21 a control character (<codeph>\C-@ </codeph> and <codeph>\C-?</codeph> give |
|
22 the characters NULL and delete), and <codeph>\E</codeph> is a synonym for <codeph>\e</codeph>. |
|
23 Finally, if not in an escape sequence, <codeph>\</codeph> escapes the following |
|
24 character and is not printed. </p> |
|
25 <table id="GUID-DD03FA46-A1EE-586E-9C0C-B5AF20B79E06"> |
|
26 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/> |
|
27 <thead> |
|
28 <row> |
|
29 <entry>Option</entry> |
|
30 <entry>Description</entry> |
|
31 </row> |
|
32 </thead> |
|
33 <tbody> |
|
34 <row> |
|
35 <entry><p> <codeph>-a</codeph> </p> </entry> |
|
36 <entry><p>Prints the arguments with the column incrementing first. Only useful |
|
37 with the <codeph>-c </codeph> and <codeph>-C</codeph> options. </p> </entry> |
|
38 </row> |
|
39 <row> |
|
40 <entry><p> <codeph>-c</codeph> </p> </entry> |
|
41 <entry><p>Print the arguments in columns. Unless <codeph>-a</codeph> is also |
|
42 given, arguments are printed with the row incrementing first. </p> </entry> |
|
43 </row> |
|
44 <row> |
|
45 <entry><p> <codeph>-C cols </codeph> </p> </entry> |
|
46 <entry><p>Print the arguments in <codeph>cols</codeph> columns. Unless <codeph>-a</codeph> is |
|
47 also given, arguments are printed with the row incrementing first. </p> </entry> |
|
48 </row> |
|
49 <row> |
|
50 <entry><p> <codeph>-i</codeph> </p> </entry> |
|
51 <entry><p>If given together with <codeph>-o</codeph> or <codeph>-O</codeph>, |
|
52 sorting is performed case-independently. </p> </entry> |
|
53 </row> |
|
54 <row> |
|
55 <entry><p> <codeph>-l</codeph> </p> </entry> |
|
56 <entry><p>Print the arguments separated by newlines instead of spaces. </p> </entry> |
|
57 </row> |
|
58 <row> |
|
59 <entry><p> <codeph>-m</codeph> </p> </entry> |
|
60 <entry><p>Take the first argument as a pattern (should be quoted), and remove |
|
61 it from the argument list together with subsequent arguments that do not match |
|
62 this pattern. </p> </entry> |
|
63 </row> |
|
64 <row> |
|
65 <entry><p> <codeph>-n</codeph> </p> </entry> |
|
66 <entry><p>Do not add a newline to the output. </p> </entry> |
|
67 </row> |
|
68 <row> |
|
69 <entry><p> <codeph>-N</codeph> </p> </entry> |
|
70 <entry><p>Print the arguments separated and terminated by nulls. </p> </entry> |
|
71 </row> |
|
72 <row> |
|
73 <entry><p> <codeph>-o</codeph> </p> </entry> |
|
74 <entry><p>Print the arguments sorted in ascending order. </p> </entry> |
|
75 </row> |
|
76 <row> |
|
77 <entry><p> <codeph>-O</codeph> </p> </entry> |
|
78 <entry><p>Print the arguments sorted in descending order. </p> </entry> |
|
79 </row> |
|
80 <row> |
|
81 <entry><p> <codeph>-P</codeph> </p> </entry> |
|
82 <entry><p>Perform prompt expansion </p> </entry> |
|
83 </row> |
|
84 <row> |
|
85 <entry><p> <codeph>-r</codeph> </p> </entry> |
|
86 <entry><p>Ignore the escape conventions of echo. </p> </entry> |
|
87 </row> |
|
88 <row> |
|
89 <entry><p> <codeph>-R</codeph> </p> </entry> |
|
90 <entry><p>Emulate the BSD echo command, which does not process escape sequences |
|
91 unless the <codeph>-e</codeph> flag is given. The <codeph>-n</codeph> flag |
|
92 suppresses the trailing newline. Only the <codeph>-e</codeph> and <codeph>-n |
|
93 </codeph> flags are recognized after <codeph>-R</codeph>; |
|
94 all other arguments and options are printed. </p> </entry> |
|
95 </row> |
|
96 <row> |
|
97 <entry><p> <codeph>-s</codeph> </p> </entry> |
|
98 <entry><p>Place the results in the history list instead of on the standard |
|
99 output. </p> </entry> |
|
100 </row> |
|
101 <row> |
|
102 <entry><p> <codeph>-u n</codeph> </p> </entry> |
|
103 <entry><p>Print the arguments to file descriptor <codeph>n</codeph>. </p> </entry> |
|
104 </row> |
|
105 <row> |
|
106 <entry><p> <codeph>-z</codeph> </p> </entry> |
|
107 <entry><p>Push the arguments onto the editing buffer stack, separated by spaces. </p> </entry> |
|
108 </row> |
|
109 </tbody> |
|
110 </tgroup> |
|
111 </table> |
|
112 <p>If any of <codeph>-m</codeph>, <codeph>-o</codeph> or <codeph>-O</codeph> are |
|
113 used in combination with <codeph>-f</codeph> and there are no arguments (after |
|
114 the removal process in the case of <codeph>-m</codeph>) then nothing is printed. </p> |
|
115 <p> <b>Note:</b> The Symbian platform does not support the use |
|
116 of the <codeph>-b</codeph>, <codeph>-d</codeph>, and <codeph>-p</codeph> options. </p> |
|
117 </conbody></concept> |