G
guard
******* Are YOU Booming Or Fuming? *******
There is nothing that will stand without a Sure Foundation.
Although it seems easy to write a quick script in great haste
with no documentation to solve today's urgent problem...
it becomes a horrifying mess later when you (or someone else)
have to reap that nightmare code which you have sown!
*******
Joe Fumer suddenly cries out,
"I just can't see why I need to spend the time!
It's ONLY a little batch file!!"
"Well..., Joe...
Remember that quick backup script that you thought
was working but it turned out that only changed
files were being copied each night?!
A Sure Foundation would have shined the light on
that problem the first day!"
"OK. Tell me more."
*******
If you're stuck in the Pit of Pity,
wasting your precious time slugging
through the Crater of Confusion...
___ DO SOMETHING ABOUT IT! ___
The confidence and reliability that we have built with
our Command Library has opened a new world for Windows
System Administrators. It is no longer necessary to
write a confusing mess of tangled code. The resources
in the Library allow self-documenting shell scripts
that really work!
One brick at a time, we are building a Tower of Knowledge
for writing .bat/.cmd files. A comprehensive
Single File Solution,
filled to the brim with answers for the most grievous
tribulations that face the Windows Admin each day,
while still retaining the look and feel of a simple
batch file. And we're doing it without third party
utilities of any kind!
You only need one file---NTCmdLib.cmd!
So leave that old darkness of confusion at the foot of
Mount Knowledge and follow the Path of Understanding
to the TOP, where clearness reigns!
*******
There's been a Flying Rumor going around about Big Things
coming, and we can now confirm that it's true!
There ARE new Advanced and Expert Libraries coming!
Here's a taste of what we have prepared!
*******
The shining star of our Command Library is the
"Mounted Command", or Mt/\Cmd for short.
This is a section of Reliable, Cross-Platform Scripting Code
that has been optimized and compressed into a single line.
Then, this little jewel is saved to an environment variable
for instant access. The variable is named to "sound like what
it does" so when you use it in your script, the script becomes
self-documenting!
For example, the code for the command .GetFree is stored in the
variable %.GetFree%. This command retrieves the free space of
the current disk drive, displays it to the console, and saves
the value to variable %#Free%.
More info about .GetFree is at
(http://TheSystemGuard.com/MtCmds/GetValue/GetFree.htm).
*******
One of our biggest challenges in constructing these commands
is that there was not an easy way to specify parameters.
The object of the command's actions had to be determined by
one of three methods.
1. Prefixing the arguments before the Mt/\Cmd
COPY Source Destination %.Silent%
2. Appending the arguments after the Mt/\Cmd
%.TimeEcho% Job started on Server1
3. Implying the argument based on some known parameter
of the console window at the time of execution.
For example, .GetFree reports on the current drive.
CD /D C:\
%.GetFree%
*******
When the required task had to "parse" a parameter,
we always needed multiple lines of code and had to
implement the next best thing: a $FUNCTION within
the Command Library.
You still call the $FUNCTION with a one line command
%.Call% $FUNCTION Parm1 Parm2 [...]
But a trip to the disk drive, and through the
Command Library was required, which is slightly
slower than our cached Mt/\Cmd code.
*******
But what if we could change the parameters anywhere inside
a command, while still having the code "preloaded" and
instantly available?! Well--now we can!! The answer is the
Twin^^Peaks MountCommand, or M^^C for short.
And it's a major leap over the wall!
In essence, this is a two-step command.
Step 1: Load the input variable with one or more parameters
Step 2: Execute the M^^C while dynamically expanding the
input variable from Step 1.
For CONSISTENCY, the input variable name is always the same as
the Twin^^Peaks command name, without the "." prefix.
Let's look at an example.
*******
A frequent SysAdmin need is to check the accessibility of a remote
system by using the native Ping utility. A new M^^C called .Alive
provides a CONSISTENT self-documenting method to check one machine,
a list of machines or an entire range of IP addresses.
The variable which contains the input is called, of course, %Alive%.
The scripting code is stored in variable %.Alive%.
Since the input is expanded at runtime, you can set the input value
and run the command within the same line of code! Delayed Variable
Expansion is not necessary, allowing full compatibility across
NT/2K/XP/K3. The self-documenting code looks like this:
FOR /L %%A IN (1,1,254) DO @(
(SET "Alive=10.7.7.%%A")
(%.Alive%)
)
..Alive takes the internal Ping command up on Mount Knowledge!
The code above will check the entire address range from
10.7.7.1 through 10.7.7.254, reporting on each address in turn.
But it get even better than that!
Success is reported to STDOUT, failure is reported to STDERR.
So, to see only the addresses that are active, suppress STDERR
using the %.Kity% {Keep-It-To-Yourself] command.
FOR /L %%A IN (1,1,254) DO @(
(SET "Alive=10.7.7.%%A")
(%.Alive% %.Kity%)
)
To see only the machines that are inaccessible,
suppress STDOUT using the %.Quiet% command.
FOR /L %%A IN (1,1,254) DO @(
(SET "Alive=10.7.7.%%A")
(%.Alive% %.Quiet%)
)
Additional examples are on the pre-release ".Alive Page" at
(http://TheSystemGuard.com/MtCmds/CrystalClear/Alive.htm).
There is also a link there to download the pre-release code
and test it on your machine.
To look up the syntax of any other "Mounted Commands"
used in the examples, see the Master Catalog at
(http://TheSystemGuard.com/MasterCatalog.asp).
*******
Joe Fumer has been reading intently and thinking about
the batch he uses to check the company's server farm.
"You mean--uh--you mean, I can replace all of my
Ping | Find "Reply"
stuff with something like:
FOR /F %%A IN (FumerFarm.txt) DO @(
(SET "Alive=%%A")
(%.Silent% %.Alive%)
(%.ifNotOK% ECHO:Meltdown on Server %%A!)
)
"Yes! YES!! Y-E-S!!!"
"And I can run it on any machine in the house?!
Even my old NT4 Servers?!"
"You sure can, Joe!
You're really soakin' up that knowledge now!"
"I see the light! I see the light!
How do I sign up? When can I get my hands
on that new Command Library?!"
*******
The new Command Libraries are nearing final trials!
When they come out as *Pure^Gold*,
we'll release them to the world!
The clock is ticking, so you better start clicking!!!
Make speed over to "The Almost Free Price List"!
at (http://TheSystemGuard.com/AlmostFree.asp)
D-O I-T N-O-W !!!
Or risk being left behind in the fumes!
*******
This is the public version of "Booming or Fuming?".
To get your own copy, which includes special offers,
available ONLY to subscribers, go to
(http://BoomingOrFuming.com). It's FREE!
Space is limited and time is short, so reserve your spot today!
*******
Communication Is Business! We Master It With Knowledge!
COME ON UP WITH US!
And Congratulations On Your Decision To
RISE ABOVE
THE REST!!!
*******
-tsg
__________________________________________________________
Are you spooked by the "Doubts of Slowdoms"?!
You can dig yourself out of another man's doubt!
GO AHEAD! Be the first to pull out from the Net of Fear.
(http://TheSystemGuard.com)
There is nothing that will stand without a Sure Foundation.
Although it seems easy to write a quick script in great haste
with no documentation to solve today's urgent problem...
it becomes a horrifying mess later when you (or someone else)
have to reap that nightmare code which you have sown!
*******
Joe Fumer suddenly cries out,
"I just can't see why I need to spend the time!
It's ONLY a little batch file!!"
"Well..., Joe...
Remember that quick backup script that you thought
was working but it turned out that only changed
files were being copied each night?!
A Sure Foundation would have shined the light on
that problem the first day!"
"OK. Tell me more."
*******
If you're stuck in the Pit of Pity,
wasting your precious time slugging
through the Crater of Confusion...
___ DO SOMETHING ABOUT IT! ___
The confidence and reliability that we have built with
our Command Library has opened a new world for Windows
System Administrators. It is no longer necessary to
write a confusing mess of tangled code. The resources
in the Library allow self-documenting shell scripts
that really work!
One brick at a time, we are building a Tower of Knowledge
for writing .bat/.cmd files. A comprehensive
Single File Solution,
filled to the brim with answers for the most grievous
tribulations that face the Windows Admin each day,
while still retaining the look and feel of a simple
batch file. And we're doing it without third party
utilities of any kind!
You only need one file---NTCmdLib.cmd!
So leave that old darkness of confusion at the foot of
Mount Knowledge and follow the Path of Understanding
to the TOP, where clearness reigns!
*******
There's been a Flying Rumor going around about Big Things
coming, and we can now confirm that it's true!
There ARE new Advanced and Expert Libraries coming!
Here's a taste of what we have prepared!
*******
The shining star of our Command Library is the
"Mounted Command", or Mt/\Cmd for short.
This is a section of Reliable, Cross-Platform Scripting Code
that has been optimized and compressed into a single line.
Then, this little jewel is saved to an environment variable
for instant access. The variable is named to "sound like what
it does" so when you use it in your script, the script becomes
self-documenting!
For example, the code for the command .GetFree is stored in the
variable %.GetFree%. This command retrieves the free space of
the current disk drive, displays it to the console, and saves
the value to variable %#Free%.
More info about .GetFree is at
(http://TheSystemGuard.com/MtCmds/GetValue/GetFree.htm).
*******
One of our biggest challenges in constructing these commands
is that there was not an easy way to specify parameters.
The object of the command's actions had to be determined by
one of three methods.
1. Prefixing the arguments before the Mt/\Cmd
COPY Source Destination %.Silent%
2. Appending the arguments after the Mt/\Cmd
%.TimeEcho% Job started on Server1
3. Implying the argument based on some known parameter
of the console window at the time of execution.
For example, .GetFree reports on the current drive.
CD /D C:\
%.GetFree%
*******
When the required task had to "parse" a parameter,
we always needed multiple lines of code and had to
implement the next best thing: a $FUNCTION within
the Command Library.
You still call the $FUNCTION with a one line command
%.Call% $FUNCTION Parm1 Parm2 [...]
But a trip to the disk drive, and through the
Command Library was required, which is slightly
slower than our cached Mt/\Cmd code.
*******
But what if we could change the parameters anywhere inside
a command, while still having the code "preloaded" and
instantly available?! Well--now we can!! The answer is the
Twin^^Peaks MountCommand, or M^^C for short.
And it's a major leap over the wall!
In essence, this is a two-step command.
Step 1: Load the input variable with one or more parameters
Step 2: Execute the M^^C while dynamically expanding the
input variable from Step 1.
For CONSISTENCY, the input variable name is always the same as
the Twin^^Peaks command name, without the "." prefix.
Let's look at an example.
*******
A frequent SysAdmin need is to check the accessibility of a remote
system by using the native Ping utility. A new M^^C called .Alive
provides a CONSISTENT self-documenting method to check one machine,
a list of machines or an entire range of IP addresses.
The variable which contains the input is called, of course, %Alive%.
The scripting code is stored in variable %.Alive%.
Since the input is expanded at runtime, you can set the input value
and run the command within the same line of code! Delayed Variable
Expansion is not necessary, allowing full compatibility across
NT/2K/XP/K3. The self-documenting code looks like this:
FOR /L %%A IN (1,1,254) DO @(
(SET "Alive=10.7.7.%%A")
(%.Alive%)
)
..Alive takes the internal Ping command up on Mount Knowledge!
The code above will check the entire address range from
10.7.7.1 through 10.7.7.254, reporting on each address in turn.
But it get even better than that!
Success is reported to STDOUT, failure is reported to STDERR.
So, to see only the addresses that are active, suppress STDERR
using the %.Kity% {Keep-It-To-Yourself] command.
FOR /L %%A IN (1,1,254) DO @(
(SET "Alive=10.7.7.%%A")
(%.Alive% %.Kity%)
)
To see only the machines that are inaccessible,
suppress STDOUT using the %.Quiet% command.
FOR /L %%A IN (1,1,254) DO @(
(SET "Alive=10.7.7.%%A")
(%.Alive% %.Quiet%)
)
Additional examples are on the pre-release ".Alive Page" at
(http://TheSystemGuard.com/MtCmds/CrystalClear/Alive.htm).
There is also a link there to download the pre-release code
and test it on your machine.
To look up the syntax of any other "Mounted Commands"
used in the examples, see the Master Catalog at
(http://TheSystemGuard.com/MasterCatalog.asp).
*******
Joe Fumer has been reading intently and thinking about
the batch he uses to check the company's server farm.
"You mean--uh--you mean, I can replace all of my
Ping | Find "Reply"
stuff with something like:
FOR /F %%A IN (FumerFarm.txt) DO @(
(SET "Alive=%%A")
(%.Silent% %.Alive%)
(%.ifNotOK% ECHO:Meltdown on Server %%A!)
)
"Yes! YES!! Y-E-S!!!"
"And I can run it on any machine in the house?!
Even my old NT4 Servers?!"
"You sure can, Joe!
You're really soakin' up that knowledge now!"
"I see the light! I see the light!
How do I sign up? When can I get my hands
on that new Command Library?!"
*******
The new Command Libraries are nearing final trials!
When they come out as *Pure^Gold*,
we'll release them to the world!
The clock is ticking, so you better start clicking!!!
Make speed over to "The Almost Free Price List"!
at (http://TheSystemGuard.com/AlmostFree.asp)
D-O I-T N-O-W !!!
Or risk being left behind in the fumes!
*******
This is the public version of "Booming or Fuming?".
To get your own copy, which includes special offers,
available ONLY to subscribers, go to
(http://BoomingOrFuming.com). It's FREE!
Space is limited and time is short, so reserve your spot today!
*******
Communication Is Business! We Master It With Knowledge!
COME ON UP WITH US!
And Congratulations On Your Decision To
RISE ABOVE
THE REST!!!
*******
-tsg
__________________________________________________________
Are you spooked by the "Doubts of Slowdoms"?!
You can dig yourself out of another man's doubt!
GO AHEAD! Be the first to pull out from the Net of Fear.
(http://TheSystemGuard.com)