home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
jambtm02.exe
/
INDEX2.TXT
< prev
next >
Wrap
Text File
|
1992-11-15
|
11KB
|
254 lines
: Copyrights guarantee and other legal stuff :
==============================================
I copyright these batch files, so that no-one else could copyright them and
prevent me from using them. No comments about US Patent Office..
For warranty (No Warranty) please read file "WARRANTY". That's all there is.
These batch files are FREEWARE, so you are free to use them for any NONPROFIT
purposes. You are free to include them or parts of them in your own free work
as long as I'm given appropriate credit (Not very likely, but I'd like that!).
These batch files come AS-IS, you use them at YOUR OWN RISK, so please check
files before running any of them. I've included my configuration so you can
study them, too, in any possible situations of incompability.
Paul Valéry said: "A poem is never finished, only abandoned", and neither
these batch files seem ever to be perfect.. Now I'm abandoning them to you,
hope you find them, if not useful or educational, at least amusing. Enjoy!
All comments are more than welcome. Also bug fixes & reports, improvements,
encouraging notes and new ideas are gladly accepted. ;-)
UNIX is a registered trademark of AT&T corporation.
MSDOS is a registered trademark of Microsoft corporation.
PC-DOS is a registered trademark of International Business Machines.
4DOS is a registered trademark of JP Software Incorporated.
Any other trademarks found here are property of their respective owners.
:INDEX.TXT - short introduction to some of these files:
==========================================================
You are reading it! Hopefully with READER.BTM... Try "reader index.txt".
Short introduction to files in this distribution describing their purpose and
usage. Most batch files give you info about their options and syntax with -?.
:LS.BTM - List directories and files:
===========================================
ls [-aCDefFlLmrRtx24?] [file `|` directory ...]
sort -e by extension alphab. smallest first -E biggest first
-n by name alphab. smallest first -N biggest first
-s by size alphab. smallest first -S biggest first
-t by time oldest first -T newest first
-f force unsorted
-r reverse all
output -C multicolumn (name)
-l long listing (name size date time attributes)
-m comma-separated list of file names
-2 2 columns (name size date time)
-4 4 columns (name size)
-x horizontal
-? help
select -a all (select also hidden and system)
-D directories
-F files
-R recursively list subdirectories
:DF.BTM - List free disk space:
=====================================
df [-a?] [drive:]
-a check all available drives
-? info
:DUS.BTM - List disk usage grouped by subdirectories:
==========================================================
dus [-at?] [directory list]
-a include all files and directories (hidden, system)
-t only grand total
-? info
Note: Total reports total disk usage only for files it can see
:DUA.BTM - List disk usage in current directory grouped by alphabets:
==========================================================================
dua
Can't handle files beginning with percent (ascii 37) or caret (ascii 94)
:PRIME.BTM - Calculate prime numbers:
========================================
prime
Three possible outputs: comma separated, space separated and columns.
Default is comma-separated, others are included as REM-commented lines.
:FIBO----.BTM - Calculate more or less Fibonacci numbers:
=========================================================
fibonacc The limit is 16 digits EVAL[] can handle
fibos255 The limit is 255 characters on command line
fibosmem The limit is available memory
:GCD-LCM.BTM - Calculate Greatest Common Divisor and Least Common Multiplier:
==============================================================================
gcd-lcm [number...]
Calculate Greatest Common Divisor and Least Common Multiplier for a group of
numbers. Numbers have to be positive integers (max 16 digits).
:DECOMPOS.BTM - Divide numbers into prime number factors:
=========================================================
decompos number(s)
Divide numbers (max 16 digits) into prime number factors
:MAN.BTM - Read command manuals:
=====================================
man [-fk?] command
-f names of manpages with "command" in name
-k names of manpages, which include "command" (need grep)
-? help
Environment Variable EDITOR: your preferable text editor
Environment Variable MANPATH: where to look for manual pages
Defaults: EDITOR=LIST MANPATH=current directory
Uses fast, easy-to-use and free FastGREP 1.72 by Christopher J. Dunford.
Note: reads *every* file fitting into description "command.*".
:READER.BTM - Read text files with on-screen indexes:
=======================================================
reader textfile.txt
-a create index in alphabetical order
-d delete index after use
-f force creating new index
Let's you read special formatted text files via on-screen index. Originally
intended as JARGON 2.9.10 interface, but was a little bit too slow... B-)
File format:
- mark title lines with colon at the beginning
- lines has to be ECHOable: avoid quotes, percents, carets, redirection chars
:READ.BTM - Read Jargon File 2.9.10:
========================================
read key_word
Read Jargon File 2.9.10 with a minimal 4dos interface. Great fun!
Note: should always give key_word to avoid memory trashing.
:RM.BTM - Remove files and directories:
=============================================
rm [-firv?] file `|` directory ...
-f Force removal: hidden/read-only/system
-i Interactive: ask permission before removing
-r Recursive removal: only normal files, check -f option
-v Verbose: tell what's happening
-? help
:CHMOD.BTM - Change file and directory attributes:
=====================================================
chmod [-`|`+`|`=] [adhprRsv?] [file `|` directory ...]
- remove attributes
+ add attributes
= set attributes
a archive attribute
h hidden attribute
r read-only attribute
s system attribute
d also directories
p pause after each full screen
R recursive
v verbose
? info
Without options you see current attributes for selected file(s) `|` dir(s).
:EVALUATE.BTM - Evaluate average execution time for a command:
==============================================================
evaluate command number
Runs command number times, creates a log file and calculates average running
time. It's presumed no command runs over an hour. If command needs arguments,
place that command in quotation marks.
Example: evaluate "df -a" 10
Note: trouble with DOS redirection characters...
:CAESAR.BTM - Caesar Cipher, by default ROT13:
================================================
caesar -key string`|`filename
-key integer (1..26) for key rotation
One of the simplest and oldest encryption methods: Caesar Cipher.
Default key is 13, when Caesar Cipher is also known as Rot13.
Input can be a string on command line or a file. If input has single quotes,
double quotes or percent characters, it *has* to be in a file.
For files it uses pre4rot.exe filter (c code included) to place 4DOS escape
character (by default ctrl-x) in front of single quote, double quote and
percent characters. Creates temperature file in TEMP drive/directory.
:CTRL-L.BTM - clear screen and preserve command line as it is:
================================================================
ctrl-l
Toggles unixlike CONTROL-L behaviour ON/OFF. When ON clears screen and
restores command line as it was. Must be disabled, when using a program
that uses Control-L. Needs full ANSI.SYS-compatible screen driver.
:FILE.BTM - identify files by their extension:
==================================================
file filename(s)
Identifies files by their extension; naturally it's only a guess, but better
than nothing. Needs DOS's external FIND command or your favourite GREP clone
and a database file.
Database file format: one file extension and its description per line.
Line format: .extension (max 3 chars) TAB description (max 63 chars). NO COMMAS.
:FACTORIA.BTM - calculate factorial:
====================================
factoria number(s)
Calculate factorial for numbers 0 - 18
:EXTENSIO.TXT - database of DOS filename extensions:
====================================================
*** All trademarks found here are property of their respective owners. ***
902 DOS filename extensions and their explanation. (15-Nov-1992)
If you want to use this file with 4DOS (eg. with FILE.BTM), there *cannot*
be any commas in this database file.
The source for this collection was hundreds of manuals, my own experience,
a couple Internet FAQs, news articles and fellow net.users. Many thanx all!
:PRE4ROT.EXE - filter to add 4DOS escape character:
===================================================
A filter that adds 4DOS escape character in front of single quotes, double
quotes and procent characters. Used by CAESAR.BTM. Escape character is hard
coded as control-x. C source code in at the end of CAESAR.BTM file.
:DEC2ROMA.BTM - convert decimal numbers to Roman numeric system
===============================================================
dec2roman [number ...]
Convert a decimal number to the Roman numeral system.
I 1 For example: 1992 - MCMXCII
V 5
X 10
L 50
C 100
D 500
M 1000
:PMMMLCG.BTM - Park & Miller random number generator
=====================================================
Prime Modulus M Multiplicative Linear Congruential Generator based on Park &
Miller article "Random Number Generators: Good Ones Are Hard to Find" CACM
October 1988, Vol 31, No. 10. Original algorithm updated by Mr. Park, this
version modified by yours truly (seems to work, still...).
Shows numbers between 1 and limit-1, which you can give as argument.
:MAKEDESC.BTM - Create a _DESC.BTM file for current directory
==============================================================
Creates a _DESC.BTM file to describe files in current directory.
-a automatic creation from descript.ion file
-d directory descriptioning included
-e edit descriptions before creating _desc.btm file
-i ignore missing descriptions
-? this info
Note: There _cannot_ be any commas, DOS redirection characters, percents
or quotes in descript.ion file! Use _echoable_ descriptions.
Note: 4desc 1.2 is great utility written by David Frey and Tom Bowden.