欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Korn Shell(K Shell) Notes (I)

系統 2592 0

Korn Shell Notes

1 Useful Cmds

wc - display a count of lines, words and characters in a file.
It can be used to count the numbers together with other commands, such as ls, who and so on.

cut - cut out selected fields of each line of a file.
The name of each unique user that is logged on is displayed using this command:
$ who | cut —f1 —d' ' | sort —u
anatole
root

print is a Korn shellspecializedcommand which is similar to echo .

nl - line numbering filter.

2 Conditional Execution

You can implement a simple if command by using the && and || operators together like this:
command1 && command2 || command3
If command1 returns true, then command2 is executed, which causes command3 to not be executed. If command1 does not return true, then command2 is not executed, which causes command3 to be executed.

3 Grouping Commands

Commands enclosed in {} are executed in current shell. If
$ echo "This is file temp:" ; cat temp | nl
This is file temp:
1 The rain in Spain
2 falls mainly on the plain
then by using {}s, the output will be:
$ { echo "This is file temp:"; cat temp ; } | nl
1 This is file temp:
2 The rain in Spain
3 falls mainly on the plain
There must be whitespace after the opening {, and commands within the {}'s must be terminated with a semi-colon.

Commands enclosed in () are executed in a subshell. Subshells are generated whenever you enclose commands in ()'s, perform command substitution, for background processes, and for coprocesses.A subshell is a separate copy of the parent shell, so variables, functions, and aliases from the parent shell are available to the subshell. However, subshells cannot change the value of parent shell variables, functions, or aliases.

4 Redirecting Standard Output

By using the > symbol, the standard output of a command can be redirected to a file, instead of your terminal.

You can also use the > command to create an empty file:
$ > tmp
$ ls —s tmp
0 tmp
This is equivalent to touch tmp .

Standard output can be appended to a file by using the >> redirect operator.

Standard output is closed with the >&- redirect operator:
$ echo "This is going nowhere" >&-
$


Korn Shell(K Shell) Notes (I)


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 欧美网站在线看 | 99精品视频在线这里只有 | 亚洲美女在线播放 | 久久这里只有精品99 | 中国欧美日韩一区二区三区 | 极品逼| 日韩高清一区二区 | 国产精品亚洲天堂 | 一级黄色大片 | 日日a.v拍夜夜添久久免费 | 国产免费视频 | 国产在线不卡午夜精品2021 | 夜夜夜爽 | 国产全肉乱妇杂乱视频 | 玖玖玖影院 | 亚洲精品日韩精品一区 | 国产日韩在线观看一区 | 国产 在线 | 日韩 | 日韩不卡一区二区 | 久久精品国产一区 | 亚洲一级免费视频 | 国产精欧美一区二区三区 | 久草精品在线 | 中文字幕精品一区二区三区精品 | 日韩 欧美 国产 亚洲 中文 | 亚洲视频在线播放 | 亚洲一区二区三区视频 | 91成人免费看 | 极品一级片 | 久久99精品久久久久久秒播 | 亚洲天堂ww| 日韩a无v码在线播放免费 | 色综合亚洲天天综合网站 | 国产真人做爰视频免费 | 国产精品久久久AV久久久 | 欧美精品一区在线 | 综合精品 | 日韩欧美一区二区三区免费观看 | 国产精品欧美一区二区三区 | 成年人在线播放 | 国产精品第一区第27页 |