NAME

EnvSet - Versatile Environment Setting Tool


SYNOPSIS

        EnvSet e_name e_string
        EnvSet e_name <some_file
        dir /s/b/ad | EnvSet
        
        EnvSet clear


Description

Usage:

        EnvSet [envarname] [envar_str]

Set 'envarname' to 'envar_str'. If all two parameters are present, just as DOS'

        SET 'envarname'='envar_str'

If 'envar_str' is omitted, read from standard input.

If 'envarname' is omitted, the default value is ``var''

If 'envarname' is ``clear'' (without quote), then clear all current session's environment contents.


Example1

Who says DOS' FOR command can only handle files!? :-)

        E:\>command
        
        Microsoft(R) Windows 95
           (C)Copyright Microsoft Corp 1981-1995.
        
        E:\>set
        COMSPEC=C:\COMMAND.COM
        PROMPT=$p$g
        VCSID=suntong
        PATH=C:\WIN95;C:\WIN95\COMMAND;D:\TOOLS;D:\PERL\BIN;C:\DOS
        
        E:\>envset clear
        
        E>set
        
        E>dir d:\perl\lib\site\tk /s/b/ad >perld
        
        E>envset <perld
        
        E>set
        var=D:\perl\lib\site\Tk\demos D:\perl\lib\site\Tk\DragDrop D:\perl\lib\site\Tk\H
        TML D:\perl\lib\site\Tk\Menu D:\perl\lib\site\Tk\pTk D:\perl\lib\site\Tk\Text D:
        \perl\lib\site\Tk\X11 D:\perl\lib\site\Tk\demos\images D:\perl\lib\site\Tk\demos
        \widget_lib D:\perl\lib\site\Tk\demos\widtrib D:\perl\lib\site\Tk\demos\widtrib\
        lib D:\perl\lib\site\Tk\demos\widtrib\lib\npuz D:\perl\lib\site\Tk\pTk\compat
        
        E>for %f in (%var%) do echo %f
        
        E>echo D:\perl\lib\site\Tk\demos
        D:\perl\lib\site\Tk\demos
        
        E>echo D:\perl\lib\site\Tk\DragDrop
        D:\perl\lib\site\Tk\DragDrop
        
        E>echo D:\perl\lib\site\Tk\HTML
        D:\perl\lib\site\Tk\HTML
        
        E>echo D:\perl\lib\site\Tk\Menu
        D:\perl\lib\site\Tk\Menu
        
        E>echo D:\perl\lib\site\Tk\pTk
        D:\perl\lib\site\Tk\pTk
        
        E>echo D:\perl\lib\site\Tk\Text
        D:\perl\lib\site\Tk\Text
        
        E>echo D:\perl\lib\site\Tk\X11
        D:\perl\lib\site\Tk\X11
        
        E>echo D:\perl\lib\site\Tk\demos\images
        D:\perl\lib\site\Tk\demos\images
        
        E>echo D:\perl\lib\site\Tk\demos\widget_lib
        D:\perl\lib\site\Tk\demos\widget_lib
        
        E>echo D:\perl\lib\site\Tk\demos\widtrib
        D:\perl\lib\site\Tk\demos\widtrib
        
        E>echo D:\perl\lib\site\Tk\demos\widtrib\lib
        D:\perl\lib\site\Tk\demos\widtrib\lib
        
        E>echo D:\perl\lib\site\Tk\demos\widtrib\lib\npuz
        D:\perl\lib\site\Tk\demos\widtrib\lib\npuz
        
        E>echo D:\perl\lib\site\Tk\pTk\compat
        D:\perl\lib\site\Tk\pTk\compat
        
        E>exit


Example2

Who says its function is only limited to files or directories!? :-) TRY THIS: Find the the CPAN site that is nearist to you by yourself!

        E>envset < cpanusa.lst
        
        E>set
        ...
        var=ftp.ou.edu ftp.bora.net ftp.duke.edu ftp.iguide.com ftp.cs.colorado.edu ftp.
        spu.edu ftp.cis.ufl.edu ftp.cdrom.com ftp.utilis.com ftp.metronet.com ftp.archiv
        e.de.uu.net ftp.flirble.org ftp.nuri.net uiarchive.uiuc.edu ftp.sedl.org ftp.ors
        t.edu ftp.sterling.com ftp.ccs.neu.edu ftp.wownet.net ftp.epix.net ftp.hkstar.co
        m ftp.oleane.net ftp.digital.com ftp.rge.com ftp.motd.com ftp.EU.net 
        
        E>for %f in (%var%) do ping %f
        
        E>ping ftp.ou.edu
        ...
        
        E>ping ftp.bora.net
        ...
        
        E>ping ftp.duke.edu
        ...

Please note:


Example3

Copy the EnvSet executable file to the current directory:

        pthf EnvSet | EnvSet where
        copy %where% .

The pthf will find out where the EnvSet is located form the 'path'. Cool isn't it? Well, register EnvSet and you'll get a Free bonus of PthF by mentioning it.


AUTHOR

Sun Tong <suntong@goecities.com>


COPYRIGHT

Copyright (c) 1997 Sun Tong. All rights reserved.

This program is FREEWARE, but requires you to register -- just send me an email :-). I want to know where my program goes.


REGISTER & OTHER INFOMATION

Register syntax:

 To:      suntong _at_ geocities -dot- com
 Subject: Register EnvSet <Your Country> <Your state>
 Body:    <Maybe blank, Any comments, bug reports, etc, are
          welcome>

Comments:

You are welcome to my home page http://www.geocities.com/SiliconValley/Lakes/2659/ . You'll find more FREE tools there.

This page is automatically generated by pod2html from perl -- http://www.perl.com


TODO