Linux Shell is a command binder in Linux. It is easy to combine those tools to make a more powerful tool or automate the work at hand.
Batch is also available in windows, and this function is also available in theory. However, its syntax and functions are different from those of Linux Shell.
If some commands only have the window version, if you use linuxshell to call the window command and pass the parameter?
Q: How can I combine the shell and tools on Linux with the commands on windows?
The answer is cywin.
Cywin: simulates the Linux Operating Environment on Windows, and can call the original window command.
For example:
for I in $ ( ls-r )
DO
out =$ ( . / test . EXE $ I) # invoke the window program with the parameter from shell .
echo $ out
done
You can directly call the Linux Command and run the window command without the batch syntax that is hard to write in windows.
AnotherQ: How to Use wine to replace cywin and run the window command on Linux?
For I in $ ( Ls-R )
Do
# In Linux environment , It will invoke the window Command Through wine
# Redirect the output of wine to null
Out = $ (wine Test . EXE $ I 2 >/ Dev / Null) Echo $ out
Done
It can also run well. This is also a solution.
HoweverProgramCywin is recommended when it cannot run on wine.
In addition, there is also a powerful tool:Ipython.
This is a basic python, cross-platform, supporting shell interaction with Linux/window. It supports "!" Operator, which can call system commands. It is worth a try.