toadloading

PowerShell 跨平台开源了

  •  
  •   toadloading · Aug 19, 2016 · 3812 views
    This topic created in 3745 days ago, the information mentioned may be changed or developed.
    PowerShell 团队发表的博客文章在这里:
    https://blogs.msdn.microsoft.com/powershell/2016/08/18/powershell-on-linux-and-open-source-2/

    文章里说:“ Alpha 版的 PowerShell 可以在 Ubuntu 14.04/16.04, CentOS 7.1, and Mac OS X 10.11 上运行。”
    (The downloads for the alpha version of PowerShell built in the PowerShell repo that work on: Ubuntu 14.04/16.04, CentOS 7.1, and Mac OS X 10.11.)

    另外,他们团队做的小视频也蛮好玩的:

    14 replies  •  2016-08-20 08:48:53 +08:00
    jyf007
    jyf007
    Aug 19, 2016 via Android
    1
    mono 一包 400Mib
    feather12315
    feather12315
    Aug 19, 2016 via Android
    2
    昨天在一 Windows 上用 PowerShell ,难用难用难用…
    zpole
    zpole
    Aug 19, 2016 via iPhone
    3
    放着 bash/zsh 不用你让我用 powershell ?
    missdeer
    missdeer
    Aug 19, 2016
    4
    估计没啥人用,在 Windows 上就很多人宁可用移植的 cygwin/msys ,更别说 Mac 和 Linux 用户了
    EchoChan
    EchoChan
    Aug 19, 2016❤️1
    5
    挺好的,冷嘲热讽的是什么鬼。
    keenkiller
    keenkiller
    Aug 19, 2016
    6
    powershell 比 bash 好

    但是我写 python 啊…
    odirus
    odirus
    Aug 19, 2016
    7
    其实我灰常喜欢微软的产品, powershell 也有牛逼的一面,只要配置得当,确实非常顺手

    同时我也喜欢 zsh 这种产品,两者都需要打磨,打磨好了就是自己的得力助手。
    mcfog
    mcfog
    Aug 19, 2016
    8
    fish 飘过
    ivmm
    ivmm
    Aug 19, 2016
    9
    powershell 和 bash 的优劣。。。 谁能给我科普一下
    longaiwp
    longaiwp
    Aug 19, 2016
    10
    这里足以说明,产品的好坏不是问题根源,而是屁股
    itisthecon
    itisthecon
    Aug 19, 2016 via Android
    11
    谁能科普下 PowerShell 到底比 bash 好在哪
    hyq
    hyq
    Aug 19, 2016
    12
    powershell 的管道支持传送对象, bash 的只支持传送文本

    比如获取 WeChat 进程的 pid
    powershell:
    get-process|%{if($_.ProcessName.Equals("WeChat")) {echo $_.Handles}}

    bash:
    ps aux|grep WeChat|grep -v grep|awk '{print $2}'
    pagxir
    pagxir
    Aug 19, 2016
    13
    这个例子只证明了 powershell 难用, 后面那么复杂的长串是啥意思,难道还让人去查一个 object 导致支持那些 method 。一个好的 shell 应该是各种工具的粘合剂,而不是试图代替原来其他正终语言的领域。

    其实,一个 shell 用来处理交互,一个脚本语言写写小工具,一个正式的语言写些比较正规程序,没有必要都混一起。试图把 python 代替 shell 来用,绝对是坑爹的事情。
    toadloading
    toadloading
    OP
    Aug 20, 2016
    14
    @pagxir 也许换个语法会好理解一点(我的电脑上没有 WeChat ):

    > Get-Process | where name -EQ 'firefox' | select name, id

    Name Id
    ---- --
    firefox 944
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2415 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 04:49 · PVG 12:49 · LAX 20:49 · JFK 23:49
    ♥ Do have faith in what you're doing.