1 Introduction
In short, pash is Bash+powershell.
2 official website
Https://github.com/Pash-Project/Pash
3 Download fedora20---LXDE desktop---32-bit version.
Http://download.fedoraproject.org/pub/fedora/linux/releases/20/Live/i386/Fedora-Live-LXDE-i686-20-1.iso
4 Install Linux with VMware Virtual machine, set user root, Password = 123456, user user001, password =123456
5 Installing Mono
Yum Install wget /etc/yumwget http://yuminstall mono-opt
6 Installation
Yum Install
#powershell Missionary Original article 2014-09-15 permitted reprint, but must retain the name and provenance, otherwise investigate legal liability
7 Compiling and installing Pash
CD/ git clone https://cd/pash//opt/mono/bin/xbuild
Run
/opt/mono/bin/mono /pash/source/pashconsole/bin/debug/pash.exe
8 with LXDE desktop, the default Notepad program Leafpad, (software called Leafpad, on the command line is also knocking Leafpad) in Linux to establish a test script, save the format utf8, pay attention to the carriage return symbol.
------------------------
#!/opt/mono/bin/mono/pash/source/pashconsole/bin/debug/pash.exe# Test.ps1Write-host'AAAA' 1..6$aaa=123if($aaa-eq123) { Write-host'BBB' } Else { Write-host'CCC' } for($i =1; $i-lt5; $i + +) { Write-host'DDD', $i} $eee=1..8foreach ($tempinch$eee) { Write-host'Eee', $temp}
-------------PostScript = Existing problem-----------Else cannot be at the beginning of the line.
if ($aaa-eq 123) { write-else { Write- Host ' CCC '}
It's OK, not here.
if ($aaa-eq 123) { Write-host ' BBB '} else { Write-
---------------Download-----------------
File Size =1GB
Note: The virtual machine is relatively large, I put it in the group to download. The above steps have been taken to download the following. That is, what you have downloaded is the one I have installed.
#QQ群号 =183173532
#名称 =powershell AC Group
Pash_in_linux_vmware Virtual machine _RAR5 version above to decompress. rar
Sha1=54277968fda57db8ce413e05914867f411c02fd7
Linux under Mono,powershell installation tutorial