pash 安裝手記

來源:互聯網
上載者:User

標籤:style   blog   http   color   os   ar   for   檔案   2014   

pash 安裝手記---在linux中運行powershell指令碼(*.ps1)

powershell in linux  ps1 in linux  pash powershell 傳教士 2014-09-15

1簡介

簡單來說pash就是bash+powershell

 

2官網

https://github.com/Pash-Project/Pash

 

3下載fedora20---lxde案頭---32位版。

http://download.fedoraproject.org/pub/fedora/linux/releases/20/Live/i386/Fedora-Live-LXDE-i686-20-1.iso

 

4用vmware虛擬機器安裝linux,設定使用者root,密碼=123456,使用者user001,密碼=123456

 

5安裝mono

yum install wgetcd /etc/yum.repos.d/wget http://download.opensuse.org/repositories/home:tpokorra:mono/Fedora_20/home:tpokorra:mono.repoyum install mono-opt

 

 

6安裝git

yum install git

 

#powershell 傳教士 原創文章 2014-09-15 允許轉載,但必須保留名字和出處,否則追究法律責任

 

7編譯安裝pash

cd /git  clone  https://github.com/Pash-Project/Pash.gitcd /Pash//opt/mono/bin/xbuild    /Pash/Pash.proj

 

 

運行

/opt/mono/bin/mono     /Pash/Source/PashConsole/bin/Debug/Pash.exe

 

 

8用lxde案頭中,預設的記事本程式leafpad,(軟體名叫leafpad,在命令列中也是敲leafpad)在linux中建立測試指令碼,儲存格式為utf8,注意斷行符號符號。

------------------------

#!/opt/mono/bin/mono     /Pash/Source/PashConsole/bin/Debug/Pash.exe# test.ps1write-host ‘aaaa‘ 

1..6$aaa=123if ($aaa -eq 123){  write-host ‘bbb‘} else{  write-host ‘ccc‘}for ($i=1;$i -lt 5;$i++){  write-host ‘ddd‘,$i} $eee=1..8foreach ($temp in $eee){  write-host ‘eee‘,$temp}

 

-------------後記=目前存在的問題-----------

else不能在行首。

if ($aaa -eq 123){    write-host ‘bbb‘} else{    write-host ‘ccc‘}

 

上面可以,下面不行

if ($aaa -eq 123){    write-host ‘bbb‘} else{    write-host ‘ccc‘}

 

---------------群內下載-----------------

注意:下述下載內容,已經經過了上述步驟。即,你下載的是我已經安裝好的了。

#QQ群號=183173532

#名稱=powershell交流群

檔案大小=1GB

pash_in_linux_vmware虛擬機器_rar5版以上才能解壓.rar

SHA1=54277968FDA57DB8CE413E05914867F411C02FD7

 

pash 安裝手記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.