Command
repro
Purpose
Reproduces the contents of a file or other input targets.
Aliases
repr, repro, reproduce, cat, catenate
Syntax
repro [ <options> ] <file> [<file> [<file> ...] ]
Options
-h Show hexadecimal representation. This option is useful for binary files.
Arguments
<file> Name of the file to be reproduced. This can be specified in relative path name,
or absolute (full) path name.
Stream Input
Contents of stream input are added to stream output. This is in addition to reproducing
the file(s) specified, if any, on the command line.
Stream Output
The reproduced content is added to stream output.
Stream Error
Any errors are listed here.
Description
This command is used to reproduce contents of file(s).
If a variable is used on command line, it must be a str variable. Its value is treated as
the name or path of the file to be reproduced. If you wish to reproduce the value of the
variable itself, use the echo command instead.
Multiple files can be specified on command line. Either relative or absolute (full) paths
can be used.
File patterns can also be specified on the command line.
Use of double quotes is recommended when specifying files or patterns.
If -h option is specified, a hexadecimal representation of the file is produced.
Restrictions
If the -h option is specified indicating a hexadecimal representation of a file,
the execution may be slow. This is because, binary files are rather large,
and also, the operating system itself is often monitoring/accessing binary files
and biterSCripting must wait until the operating system allows it access to the file.
Further, if the output of the command with -h option is written to screen,
some beginning part of the output may be chopped off for performance reasons.
So, if -h option is used, it is always recommended that the output be
redirected to a file, so you can view the entire output. Also, file operations
are faster than screen operations, so redirecting output to a file will also
be faster.
Valid Examples
repro "*.cpp"
Will reproduce contents of all files with extension .cpp in current directory.
var str file
...
# $file is set to a file name.
...
repro $file
Will reproduce the contents of the file whose name is assigned to variable $file.
Invalid Examples
var int i
set $i=1
repro $i
The above will look for a file "1" in the current directory. If such a file does not
exist, no output will be produced. If you want to print the value of $i instead, use
the following.
echo $i
See Also
var
echo
|
© 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.
|