PRODUCT |

|

|
|
|

|
|
|
|
|
|
|
|
|
FAQ |
|
|

|
|
|
|
|
|
|
|
|
|
LEARN SCRIPTING |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SAMPLE SCRIPTS |
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HELP / DOCUMENTATION |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
Help Page - error
( Some help pages may not display correctly in html because those help pages may have sample code in them, part of which may be mis-interpreted as html tags.
All help pages, including this help page, are available in biterScripting with the help command. )
|
|
|
System Feature
Error Stream Redirection
Purpose
Redirection of contents of error streams
Syntax
2> <file_name> | $<str_var_name> | { <inline_command> } | NULL
2>> <file_name> | $<str_var_name> | { <inline_command> } | NULL
Arguments
<file_name>
Name of a file to which error is to be written. It
can be a name relative to the current directory,
or full path name.
<str_var_name>
Name of a string variable to which error is to be written.
The variable must be declared prior to its use. Also,
the variable must of type str.
<inline_command>
The output of the inline command specifies the redirection
target.
NULL
Error will be ignored.
Description
The error stream is written to the redirection
target after processing the current command.
If a single > is used, the original contents of redirection
target will be erased. If a double >> is used, the original contents
will be preserved and the error from current
command will be appended to the original contents.
If file_name does not exist, it will be created.
If NULL is specified, any errors will be ignored (and not written anywhere).
If error redirection is not specified, the errors will be written to
screen. This does not apply to batch mode, since the screen is not
available during batch mode.
Restrictions
Redirection is not allowed in the following.
fun
return
end
set
if
else
endif
while
do
done
If redirection is specified on these commands,
it will be ignored.
If inline command is used for redirection, it must
result in one (and only one) file name or variable name.
Valid Examples
len "myfile.cpp" 2> errfile.txt
Error from the len command will be
written to errfile.txt. The original
contents of errfile.txt, if any, will be lost.
len myfile.cpp 2>> errfile.txt
Error from the len command will be appended to
the original contents of errfile.txt.
Invalid Examples
set $wordCount=100 2>errFile.txt
Will produce an error. Redirection is not
allowed in set command.
See Also
inline
input
output
|
|
|
© 2008-2010, biterScripting.com. All rights reserved.
biterScripting, biterScript, biterBrowser, biterScripting.com, FVA (Forward Variable Assignment) are trademarks of biterScripting.com. Is it biterScripting-compatible ? is a service mark of biterScripting.com.
Explorer, Unix, Windows are trademarks, service marks or other forms of intellectual property of their respective owners.
|
|