Skip to content

Commit e50bebc

Browse files
author
jsdnhk
committed
posted Aug2020 blog
1 parent 845b57e commit e50bebc

File tree

5 files changed

+57
-3
lines changed

5 files changed

+57
-3
lines changed

_data/links.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
suggestions:
4848
- https://evernote.com
4949
- https://monday.com
50+
- https://deepl.com
5051
- https://hackmd.io
5152
- https://explainshell.com
5253
- https://draw.io

_data/pages_latest.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
- name: blog
3-
mtime: 1-7-2020
3+
mtime: 1-8-2020
44
- name: debug
55
mtime: 26-2-2020
66
- name: fonts
77
mtime: 7-3-2020
88
- name: links
9-
mtime: 11-6-2020
9+
mtime: 2-8-2020
1010
- name: quotes
1111
mtime: 26-2-2020
1212
- name: resume
1313
mtime: 2-2-2020
1414
- name: toolset
15-
mtime: 1-7-2020
15+
mtime: 2-8-2020

_data/toolset/gardener.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@
110110
- name: tmux
111111
url: https://github.com/tmux/tmux/wiki
112112
desc: Terminal multiplexer that enable running several programs in one terminal
113+
- name: z
114+
url: https://github.com/rupa/z
115+
desc: Jump around directories like ninja by memorzing and using the path keywords
113116
- name: exa
114117
url: https://the.exa.website
115118
desc: Modern replacement for ls
486 KB
Loading
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "Smoother and closer touch by Powershell"
3+
tags: [windows, cross-platform, powershell]
4+
category: "powershell"
5+
comment: true
6+
---
7+
8+
### Background
9+
10+
After Microsoft told the world about the desire to Linux, Windows Powershell became shared to the world like Linux did,
11+
12+
also supported cross-platform since 2016, which is the task automation and configuration management framework,
13+
14+
with unique command-line shell and scripting language. There are some classic shells still widely used in Linux.
15+
16+
Some of the Linux or open-source fans may laugh at what Windows try to compact with Linux and even MacOS.
17+
18+
However, [Powershell][ms-powershell] is further improvement version from history with modern IT view by many intelligent experts,
19+
20+
actually for some admin tasks it always can give much sharper solutions than the old-school [UNIX shells][unix-shells].
21+
22+
### Design
23+
24+
From official, Windows PowerShell can execute four kinds of named commands:
25+
26+
- **cmdlets**: <br>command-lets are .NET programs followed *Verb*-*Noun* naming pattern, receive/emit objects through pipeline
27+
- **PowerShell scripts**: <br>chain of commands to execute which pipeline objects can be passed, secured by execution policy
28+
- **PowerShell functions**: <br>a grouping of code that handle input and return output, advanced functions can create "*script cmdlets*"
29+
- **Standalone executable programs**: <br>launches it in a separate process, as usual as the standard way
30+
31+
### Benefits
32+
33+
1. **Cross-platform**: <br>general set of commands which are fitted for both Windows, Linux, MacOS, that one shell is needed to learn only
34+
2. **Structured-object data**: <br>optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models
35+
3. **Humanized language**: <br>comprehensible cmdlets and syntax closed to human thinking and logic, powerful auto-completion with help
36+
37+
There is no doubt that the new Powershell is a time evolution shell interface for human to talk with computer.
38+
39+
However, it still needs time to develop and grow up to become an universal IT standard in real, it made a good start!
40+
41+
### Syntax
42+
43+
The common use of powershell is shown below.
44+
45+
The image may be small to display, then drag the image to new tab to lookup.
46+
47+
![ps-cheatsheet](/assets/posts/2020-08-01/powershell-cheat-sheet.jpg)
48+
49+
[ms-powershell]: https://docs.microsoft.com/en-us/powershell/
50+
[unix-shells]: https://en.wikipedia.org/wiki/Unix_shell

0 commit comments

Comments
 (0)