OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [alias-command.html] - Blame information for rev 588

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>alias</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="Common Commands"
23
HREF="common-commands.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Common Commands"
26
HREF="common-commands.html"><LINK
27
REL="NEXT"
28
TITLE="baudrate"
29
HREF="baudrate-command.html"></HEAD
30
><BODY
31
CLASS="REFENTRY"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="common-commands.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
></TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="baudrate-command.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><H1
81
><A
82
NAME="ALIAS-COMMAND">alias</H1
83
><DIV
84
CLASS="REFNAMEDIV"
85
><A
86
NAME="AEN2927"
87
></A
88
><H2
89
>Name</H2
90
>alias&nbsp;--&nbsp;Manipulate command line aliases</DIV
91
><DIV
92
CLASS="REFSYNOPSISDIV"
93
><A
94
NAME="AEN2930"><H2
95
>Synopsis</H2
96
><P
97
><B
98
CLASS="COMMAND"
99
>alias</B
100
>  {<TT
101
CLASS="REPLACEABLE"
102
><I
103
> name</I
104
></TT
105
>} [<TT
106
CLASS="REPLACEABLE"
107
><I
108
> value</I
109
></TT
110
>]</P
111
></DIV
112
><DIV
113
CLASS="REFSECT1"
114
><A
115
NAME="AEN2937"
116
></A
117
><H2
118
>Arguments</H2
119
><DIV
120
CLASS="INFORMALTABLE"
121
><A
122
NAME="AEN2939"><P
123
></P
124
><TABLE
125
BORDER="1"
126
CLASS="CALSTABLE"
127
><THEAD
128
><TR
129
><TH
130
WIDTH="25%"
131
ALIGN="LEFT"
132
VALIGN="TOP"
133
>Name</TH
134
><TH
135
WIDTH="25%"
136
ALIGN="LEFT"
137
VALIGN="TOP"
138
>Type</TH
139
><TH
140
WIDTH="25%"
141
ALIGN="LEFT"
142
VALIGN="TOP"
143
>Description</TH
144
><TH
145
WIDTH="25%"
146
ALIGN="LEFT"
147
VALIGN="TOP"
148
>Default</TH
149
></TR
150
></THEAD
151
><TBODY
152
><TR
153
><TD
154
WIDTH="25%"
155
ALIGN="LEFT"
156
VALIGN="TOP"
157
><TT
158
CLASS="REPLACEABLE"
159
><I
160
>name</I
161
></TT
162
></TD
163
><TD
164
WIDTH="25%"
165
ALIGN="LEFT"
166
VALIGN="TOP"
167
>Name</TD
168
><TD
169
WIDTH="25%"
170
ALIGN="LEFT"
171
VALIGN="TOP"
172
>The name for this alias.</TD
173
><TD
174
WIDTH="25%"
175
ALIGN="LEFT"
176
VALIGN="TOP"
177
><SPAN
178
CLASS="emphasis"
179
><I
180
CLASS="EMPHASIS"
181
>none</I
182
></SPAN
183
></TD
184
></TR
185
><TR
186
><TD
187
WIDTH="25%"
188
ALIGN="LEFT"
189
VALIGN="TOP"
190
><TT
191
CLASS="REPLACEABLE"
192
><I
193
>value</I
194
></TT
195
></TD
196
><TD
197
WIDTH="25%"
198
ALIGN="LEFT"
199
VALIGN="TOP"
200
>String</TD
201
><TD
202
WIDTH="25%"
203
ALIGN="LEFT"
204
VALIGN="TOP"
205
>Replacement value for the alias.</TD
206
><TD
207
WIDTH="25%"
208
ALIGN="LEFT"
209
VALIGN="TOP"
210
><SPAN
211
CLASS="emphasis"
212
><I
213
CLASS="EMPHASIS"
214
>none</I
215
></SPAN
216
></TD
217
></TR
218
></TBODY
219
></TABLE
220
><P
221
></P
222
></DIV
223
></DIV
224
><DIV
225
CLASS="REFSECT1"
226
><A
227
NAME="AEN2966"
228
></A
229
><H2
230
>Description</H2
231
><P
232
>The <B
233
CLASS="COMMAND"
234
>alias</B
235
> command is used to maintain simple command
236
line aliases.  These aliases are shorthand for longer expressions.
237
When the pattern %{name} appears in a command line, including in a script,
238
the corresponding value will be substituted.  Aliases may be nested.
239
      </P
240
><P
241
>If no value is provided, then the current value of the alias is displayed.
242
      </P
243
><P
244
>If the system supports non-volatile configuration data via the
245
<B
246
CLASS="COMMAND"
247
>fconfig</B
248
> command (see <A
249
HREF="persistent-state-flash.html"
250
>the Section called <I
251
>Persistent State Flash-based Configuration and Control</I
252
> in Chapter 2</A
253
>),
254
then the value will be saved and used when the system is reset.
255
      </P
256
></DIV
257
><DIV
258
CLASS="REFSECT1"
259
><A
260
NAME="AEN2974"
261
></A
262
><H2
263
>Examples</H2
264
><P
265
>Set an alias.
266
<TABLE
267
BORDER="5"
268
BGCOLOR="#E0E0F0"
269
WIDTH="70%"
270
><TR
271
><TD
272
><PRE
273
CLASS="SCREEN"
274
>
275
RedBoot&#62; <TT
276
CLASS="USERINPUT"
277
><B
278
>alias joe "This is Joe"</B
279
></TT
280
>
281
Update RedBoot non-volatile configuration - continue (y/n)? n</PRE
282
></TD
283
></TR
284
></TABLE
285
> </P
286
><P
287
>Display an alias.
288
<TABLE
289
BORDER="5"
290
BGCOLOR="#E0E0F0"
291
WIDTH="70%"
292
><TR
293
><TD
294
><PRE
295
CLASS="SCREEN"
296
>
297
RedBoot&#62; <TT
298
CLASS="USERINPUT"
299
><B
300
>alias joe</B
301
></TT
302
>
303
'joe' = 'This is Joe'</PRE
304
></TD
305
></TR
306
></TABLE
307
> </P
308
><P
309
>Use an alias.  Note: the <B
310
CLASS="COMMAND"
311
>"="</B
312
> command simply echoes the command to to console.
313
<TABLE
314
BORDER="5"
315
BGCOLOR="#E0E0F0"
316
WIDTH="70%"
317
><TR
318
><TD
319
><PRE
320
CLASS="SCREEN"
321
>
322
RedBoot&#62; <TT
323
CLASS="USERINPUT"
324
><B
325
>= %{joe}</B
326
></TT
327
>
328
This is Joe</PRE
329
></TD
330
></TR
331
></TABLE
332
></P
333
><P
334
>Aliases can be nested.
335
<TABLE
336
BORDER="5"
337
BGCOLOR="#E0E0F0"
338
WIDTH="70%"
339
><TR
340
><TD
341
><PRE
342
CLASS="SCREEN"
343
>RedBoot&#62; <TT
344
CLASS="USERINPUT"
345
><B
346
>alias frank "Who are you? %{joe}"</B
347
></TT
348
>
349
Update RedBoot non-volatile configuration - continue (y/n)? n
350
RedBoot&#62; <TT
351
CLASS="USERINPUT"
352
><B
353
>= %{frank}</B
354
></TT
355
>
356
Who are you? This is Joe</PRE
357
></TD
358
></TR
359
></TABLE
360
></P
361
><P
362
>Notice how the value of %{frank} changes when %{joe} is changed since
363
the value of %{joe} is not evaluated until %{frank} is evaluated.
364
<TABLE
365
BORDER="5"
366
BGCOLOR="#E0E0F0"
367
WIDTH="70%"
368
><TR
369
><TD
370
><PRE
371
CLASS="SCREEN"
372
>RedBoot&#62; <TT
373
CLASS="USERINPUT"
374
><B
375
>alias joe "This is now Josephine"</B
376
></TT
377
>
378
Update RedBoot non-volatile configuration - continue (y/n)? n
379
RedBoot&#62; <TT
380
CLASS="USERINPUT"
381
><B
382
>= %{frank}</B
383
></TT
384
>
385
Who are you? This is now Josephine</PRE
386
></TD
387
></TR
388
></TABLE
389
>
390
      </P
391
></DIV
392
><DIV
393
CLASS="NAVFOOTER"
394
><HR
395
ALIGN="LEFT"
396
WIDTH="100%"><TABLE
397
SUMMARY="Footer navigation table"
398
WIDTH="100%"
399
BORDER="0"
400
CELLPADDING="0"
401
CELLSPACING="0"
402
><TR
403
><TD
404
WIDTH="33%"
405
ALIGN="left"
406
VALIGN="top"
407
><A
408
HREF="common-commands.html"
409
ACCESSKEY="P"
410
>Prev</A
411
></TD
412
><TD
413
WIDTH="34%"
414
ALIGN="center"
415
VALIGN="top"
416
><A
417
HREF="ecos-ref.html"
418
ACCESSKEY="H"
419
>Home</A
420
></TD
421
><TD
422
WIDTH="33%"
423
ALIGN="right"
424
VALIGN="top"
425
><A
426
HREF="baudrate-command.html"
427
ACCESSKEY="N"
428
>Next</A
429
></TD
430
></TR
431
><TR
432
><TD
433
WIDTH="33%"
434
ALIGN="left"
435
VALIGN="top"
436
>Common Commands</TD
437
><TD
438
WIDTH="34%"
439
ALIGN="center"
440
VALIGN="top"
441
><A
442
HREF="common-commands.html"
443
ACCESSKEY="U"
444
>Up</A
445
></TD
446
><TD
447
WIDTH="33%"
448
ALIGN="right"
449
VALIGN="top"
450
>baudrate</TD
451
></TR
452
></TABLE
453
></DIV
454
></BODY
455
></HTML
456
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.