Reproduces the contents of a file or other input targets.
repr, repro, reproduce, cat, catenate
repro [ <options> ] <file> [<file> [<file> ...] ]
-h Show hexadecimal representation. This option is useful for binary files.
This option can only be used with local files.
<file> Name of the file to be reproduced. This can be specified in relative path name,
or absolute (full) path name. This name can also start with "http://" or
"https://", in which case, the file (document) will be retrieved from internet.
Contents of stream input are added to stream output. This is in addition to reproducing
the file(s) specified as command arguments.
The reproduced content is added to stream output.
Any errors are listed here.
This command is used to reproduce contents of file(s) and internet document(s).
If a variable is used as argument, it must be a string variable. Its value is treated as
the name or path of the file to be reproduced.
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.
The execution may be slow when binary files are reproduced. This is because,
binary files are rather large, and also, the operating system itself is often
monitoring/accessing binary files itself, and biterScripting must wait
until the operating system allows access to the binary files.
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.
Will reproduce contents of all files with extension .cpp in current directory.
var str file
set Sfile = "/temp/x.txt"
Will reproduce the contents of the file /temp/x.txt.
Let's say you want to examine the contents of an executable file /program files/my program/x.exe.
repro -h "/program files/my program/x.exe" > "/temp/hexadecimal.txt"
The file /temp/hexadecimal.txt will now contain the hexadecimal representation of file x.exe.
You can open hexadecimal.txt with a text editor and examine its contents.
This command will connect to the web server http://www.myserver.com,
retrieve the document /mypage.html from it, and reproduce its contents.
var int 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 variable i instead,
use the echo command instead as follows.
Since the file does not begin with "http://" or "https://", it will be assumed
that the file is local (on the same computer). It will then attempt to reproduce
the file mypage.html in the folder www.myserver.com. If the intention is to
get mypage.html from the web domain myserver.com, use |http://" to let biterScripting
know that you intend to retrieve a web document, as follows.
repro -h "http://www.myserver.com/mypage.html"
This will produce the following error,
Error 605: Input file http://www.myserver.com/mypage.html in not a local file. Only local binary files can be accessed with -h option.
The error is produced because -h option can only be used with local files (files on the same
computer). Internet documents can not be displayed with this option. To download a binary
document from Internet, such as videos, photos, graphics, sound files, use the isret
command with the -b option. Please see the help page on IS (Internet Sessions).
© 2008-2013, biterScripting.com. All rights reserved.
biterScripting, biterScript, biterBrowser, biterMobile, 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.