How to use shell variable in a kermit shell script

How to use shell variable in a kermit shell script

Post by Frederi » Fri, 12 Nov 2004 08:46:25


Hi,

In a kermit shell script doing FTP transfert, between 1 master server to
many slave, I need to use values stored in shell environment variable. How
can I do this?
Best regards,


frederic,
 
 
 

How to use shell variable in a kermit shell script

Post by nospa » Fri, 12 Nov 2004 09:50:09

Frederic,

You can simply echo the var to a file, then read the contents of the file,
parsing if necessary
depending on the o/s. From WinXP:

[C:\] K-95> run set temp > file
[C:\] K-95> type file
TEMP=C:\DOCUME~1\xxx\LOCALS~1\Temp


There are probably more elegant ways as well, that I'll learn when Frank
pops his
infinite wisdom out here :)

 
 
 

How to use shell variable in a kermit shell script

Post by Mark Sapir » Fri, 12 Nov 2004 14:03:35


to
variable. How

Do you mean a Kermit script? If so, in MS-Kermit, C-Kermit and
Kermit-95, the environment is accessible via \$(environment_variable).

For example:

[C:\Program Files\Kermit 95 2.1\] K-95> echo \$(temp)
C:\DOCUME~1\Owner\LOCALS~1\Temp
[C:\Program Files\Kermit 95 2.1\] K-95> echo \$(path)
C:\Tcl\bin;F:\CVS\ssh\ssh;c:\program files\kermit 95
2.1;c:\gnuwin32\bin;f:\bin;f:\m51;f:\m51\bin;f:\c51;f:\c51\bin;f:AST_C\progra~1\basic;C:\WINDOWS\system32;C:\WINDOWS;c:\gs\gs8.14\bin;c:\gs\gs8.14\lib;C:\Program
Files\Python;C:\WINDOWS\System32\Wbem;C:\Program files\PC-Doctor for
Windows XP\WINDSAPI
[C:\Program Files\Kermit 95 2.1\] K-95>