--- --- Sift 5.0 19940312 (o) (o) ^ by Stephen D Childers \_____/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** WARNING !!! *** *** WARNING !!! *** This program can damage [ouch] important files if not used properly. Do not use this program on original files unless you know exactly what you are doing. This is the warning that should have been given with previous releases of this program. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Program Description: 1) This program will sift out user defined byte values from a file. The range of byte values that may be sifted out of a file is the normal values that a byte may represent ( 0 through 255 decimal ). 2) Can run only from CLI. Can be made resident. 3) Program (when run from CLI) will interact with the 'c:Why' command after program failures; this command may provide a more detailed explanation of why the program failed. The 'Why' command should be used immediately after a program failure to extract the last program's result code, because that result code is changed upon the execution of the next CLI command. 4) Certain error reports will contain the name of the argument, file, device, (etc) that is associated with failure when it occurs. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CLI Usage: Usage > Sift [!] [[-options] input [output] filter] ! = show author info options: q = Quiet; do not print messages o = Overwrite input, [output] not needed input = file to be sifted output = file to receive sifted data filter = This is a text file which informs Sift which byte values to sift while reading the inputfile. CLI Usage notes: 1) Input arg must be a file and can not be a device or directory, and output arg can now designate a device and/or directory as the destination for sifted data. If output arg is not a file then input file name will be taken and used for the output file name. ie > Sift noisycapture.txt df0: filter2.txt or > Sift noisycapture.txt df0:stuff/ filter2.txt 2) If the output arg is not given (and option -o is not selected) then the input arg (file name) will be used in creating the output file name, and that name will have the extension ".SFT" appended to it. Output will be put in the same directory as the input file. 3) If the output arg is a device or directory name then the output of the sifted input file is sent to the given directory. 4) Option -o does not require the output file arg, and program will ignore output arg if option -o is given. 5) Option -o requires loading all of the input file into memory, and if there is not enough memory the program will inform you to try again without option -o. 6) Option -o will not overwrite input file unless the bytes sifted is greater than zero. 7) The <-options> arg can appear any where within the command line template, thereby allowing this program to be used with various "S:SPAT" like script files, thus allowing the use of wild characters. ie > Execute SPAT Sift *.txt -o filter1.txt or > Execute SPAT Sift #?.txt -o filter1.txt or > Execute SPAT Sift #?.txt df1: filter1.txt or > Execute SPAT Sift #?.txt df1:texts/ filter1.txt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to create a filterfile: 1) First line of filterfile must have the word "Sift.filter" on it or Sift complains. 2) This text file can be created and modified by the user using any editor program. The values that you put into this file will tell Sift which character codes to ignore when reading your inputfile and making your outputfile. 3) The filter text file may contain user notes, and any notes that you write within your own filter files must be preceded with semi-colons ";" or else the Sift program may not filter properly after reading your filter file into memory. 4) The filter text file character values may be writen as hex or decimal. Hex values must have an 'h' attached to the front of it. 5) One character or a range of characters may be indicated. 6) Putting a dash between values indicates a range of characters to sift. 7) A comma must be inserted between each character or between each range of characters, and the values at the end of any line do not need anything after them. 8) See the files "filter.txt" and "filter.ed" for examples of how to write your own filter files. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Version History: The following information briefly describes changes or improvements made to each version, and they will be described in descending order; meaning latest version information begins first: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 5.0 (19940312) - 1) Changed version numbering format. Program can now be used with the "Version" command. Date within parenthesis is shown in a somewhat international format as (yyyymmdd). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 19930803 - 1) Optimized and refined source code thereby making program smaller. 2) Added "*** WARNING !!! ***" paragraph to document file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 19920108 - 1) Removed a CLI parsing problem. 2) Can be made resident. 3) Added option -o. 4) The <-options> arg can now appear any where within the command line template, thereby allowing this program to be used with various "S:SPAT" like script files, thus allowing the use of wild characters. 5) Input arg must be a file, and output arg can now designate a path. and/or directory as the destination for sifted data. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 19910917 - 1) This version should be a wee bit faster than previous version. 2) Usage template has changed. 3) First line of filterfile must have the word "Sift.filter" on it or Sift complains. 4) Improved error reports. 5) Program (when run from CLI) will now interact with the 'c:Why' command after program failures. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 19910712 - The first version. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ /\/ \/\ /\/ 6 Better is the poor that walketh in his uprightness, \/\ \/\ than he that is perverse in his ways, though he be rich. /\/ /\/ \/\ \/\ The King James Holy Bible - Proverbs 28:6 /\/ \/\ /\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End Of Document