
Power Shell
文章平均质量分 76
kissjob
这个作者很懒,什么都没留下…
展开
-
Power Shell 基本概念
命令的语法:command(命令的名称) -parameter1(Switch Parameter,不需要Argument) -parameter2 arg1(含有Argument的Parameter) arg2(Positional Argument)命令的4种分类:1)cmd原创 2011-07-18 11:10:09 · 1083 阅读 · 0 评论 -
操作符号,表达式,流程控制
1.算术运算符+-*/%(和.NET的不太一样,不仅在数字上面,也可以放在String,数组上面执行)+: 2+4->6; "hi"+"there"->"hithere"* 2*3->6 ; "2"*3->"222"加法运算符号:符合“左手系规则”:即 a+b不一定等于b+aThe “left-hand” rule for arithmetic operators:原创 2011-07-19 16:46:01 · 569 阅读 · 0 评论 -
函数,脚本
1.无参function:缺省数组参数为$args,输出时各个参数默认以空格为间隔;可以定义$OFS来指定间隔符号;PS (3) > function hello { "Hello there $args, how are you?" }PS (4) > hello BobHello there Bob, how are you?PS (5) > hello Bob Alice原创 2012-01-10 10:02:25 · 445 阅读 · 0 评论