m Windows Command Shell
Key Points
Windows command shell runs well in Windows, with some limited support in dnet Linux
Command shell can run a program and keep shell open EXIT /b or run program and close shell too EXIT /
References
Reference_description_with_linked_URLs_______________________ | Notes______________________________________________________________ |
---|---|
https://superuser.com/questions/1297103/do-powershell-cmdlets- run-on-linux-dotnet-or-only-microsoft-net | Where power shell runs |
Power Shell ebook basics | |
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands | Windows command shell reference |
Key Concepts
Sample BAT file using Windows commands
echo 'openssl_start.bat'
echo off
set opensslpath=d:\dsfw\utils\OpenSSL1V1
set opensslbin=%opensslpath%\bin
SET OPENSSL_HOME=%opensslpath%
SET OPENSSL_BIN=%opensslbin%
rem if not exist %%1 echo 'arg 1 %%1 is required - a string value '
rem -----------------
if exist zztemp.txt echo " zztemp.txt exists .. deleting zztemp.txt "
if exist zztemp.txt del zztemp.txt
echo 'zztemp.txt is the output file '
echo %Path% > zztemp.txt
rem -----------------
set zzsearch=openssl
findstr /i %zzsearch% zztemp.txt
if ERRORLEVEL 1 goto setpath
echo " ... path already set for openssl "
goto endpgm
rem -----------------
:setpath
echo " ... adding ..\openssl\bin to path";
set Path=.;%opensslbin%;%Path%
rem -----------------
:endpgm
echo " openssl path is: %Path% "
echo " "
openssl version
EXIT /b
PowerShell
PowerShell overview ebook
Windows PowerShell Tutorial for Beginners.pdf gdrv
Where PowerShell runs
Do PowerShell cmdlets run on Linux dotnet? Or only Microsoft .NET?
Title says it all. Wikipedia says:
Design[edit] PowerShell's developers based the core grammar of the tool on that of POSIX 1003.2.[21]
Windows PowerShell can execute four kinds of named commands:[22]
cmdlets (.NET Framework programs designed to interact with PowerShell) PowerShell scripts (files suffixed by .ps1) PowerShell functions standalone executable programs If a command is a standalone executable program, PowerShell launches it in a separate process; if it is a cmdlet, it executes in the PowerShell process. PowerShell provides an interactive command-line interface, wherein the commands can be entered and their output displayed. The user interface, based on the Win32 console, offers customizable tab completion. PowerShell enables the creation of aliases for cmdlets, which PowerShell textually translates into invocations of the original commands. PowerShell supports both named and positional parameters for commands. In executing a cmdlet, the job of binding the argument value to the parameter is done by PowerShell itself, but for external executables, arguments are parsed by the external executable independently of PowerShell interpretation.[citation needed]
The PowerShell Extended Type System (ETS) is based on the .NET type system, but with extended semantics (for example, propertySets and third-party extensibility). For example, it enables the creation of different views of objects by exposing only a subset of the data fields, properties, and methods, as well as specifying custom formatting and sorting behavior. These views are mapped to the original object using XML-based configuration files.[23]
which indicates that .NET
is required and that Linux dotnet
is insufficient to run cmdlets.
Potential Value Opportunities
Potential Challenges
Candidate Solutions
Step-by-step guide for Example
sample code block