亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2761 | 回復(fù): 8
打印 上一主題 下一主題

[系統(tǒng)管理] 請問如下命令是干嘛用的,誰幫忙解釋下,很感謝! [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2012-11-07 10:38 |只看該作者 |倒序瀏覽
#!/usr/bin/env bash


pdsh -w ^/opt/shell/master/cluster_command/adam_agent.txt $@

幫忙解釋詳細(xì)點,每個參數(shù)都代表什么意思,非常感謝!在線等,呵呵

論壇徽章:
15
2015年辭舊歲徽章
日期:2015-03-03 16:54:15雙魚座
日期:2015-01-15 17:29:44午馬
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉雞
日期:2014-04-02 12:24:51雙子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥豬
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大;照
日期:2013-04-17 11:48:45
2 [報告]
發(fā)表于 2012-11-21 11:22 |只看該作者
自己要先看一下幫助

man pdsh

-w TARGETS,...

Target and or filter the specified list of hosts. Do not use with any other node selection options (e.g. -a, -g, if they are available). No spaces are allowed in the comma-separated list. Arguments in the TARGETS list may include normal host names, a range of hosts in hostlist format (See HOSTLIST EXPRESSIONS), or a single '-' character to read the list of hosts on stdin.
If a host or hostlist is preceded by a '-' character, this causes those hosts to be explicitly excluded. If the argument is preceded by a single '^' character, it is taken to be the path to file containing a list of hosts, one per line. If the item begins with a '/' character, it is taken as a regular expression on which to filter the list of hosts (a regex argument may also be optionally trailed by another '/', e.g. /node.*/). A regex or file name argument may also be preceeded by a minus '-' to exclude instead of include thoses hosts.

A list of hosts may also be preceded by "user@" to specify a remote username other than the default, or "rcmd_type:" to specify an alternate rcmd connection type for these hosts. When used together, the rcmd type must be specified first, e.g. "ssh:user1@host0" would use ssh to connect to host0 as user "user1."
  1. $@
  2. 與$*同義,但是每個參數(shù)都是一個獨立的""引用字串,這就意味著參數(shù)被完整地傳遞,并沒有被解釋和擴展.這也意味著,每個參數(shù)列表中的每個參數(shù)都被當(dāng)成一個獨立的單詞.
  3. 注意:"$@"必須被""引用.
復(fù)制代碼

論壇徽章:
15
2015年辭舊歲徽章
日期:2015-03-03 16:54:15雙魚座
日期:2015-01-15 17:29:44午馬
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉雞
日期:2014-04-02 12:24:51雙子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥豬
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大;照
日期:2013-04-17 11:48:45
3 [報告]
發(fā)表于 2012-11-21 11:22 |只看該作者
dsy851009 發(fā)表于 2012-11-07 12:38
#!/usr/bin/env bash

自己要先看一下幫助
  1. man pdsh

  2. -w TARGETS,...

  3. Target and or filter the specified list of hosts. Do not use with any other node selection options (e.g. -a, -g, if they are available). No spaces are allowed in the comma-separated list. Arguments in the TARGETS list may include normal host names, a range of hosts in hostlist format (See HOSTLIST EXPRESSIONS), or a single '-' character to read the list of hosts on stdin.
  4. If a host or hostlist is preceded by a '-' character, this causes those hosts to be explicitly excluded. If the argument is preceded by a single '^' character, it is taken to be the path to file containing a list of hosts, one per line. If the item begins with a '/' character, it is taken as a regular expression on which to filter the list of hosts (a regex argument may also be optionally trailed by another '/', e.g. /node.*/). A regex or file name argument may also be preceeded by a minus '-' to exclude instead of include thoses hosts.
復(fù)制代碼
A list of hosts may also be preceded by "user@" to specify a remote username other than the default, or "rcmd_type:" to specify an alternate rcmd connection type for these hosts. When used together, the rcmd type must be specified first, e.g. "ssh:user1@host0" would use ssh to connect to host0 as user "user1."
  1. $@
  2. 與$*同義,但是每個參數(shù)都是一個獨立的""引用字串,這就意味著參數(shù)被完整地傳遞,并沒有被解釋和擴展.這也意味著,每個參數(shù)列表中的每個參數(shù)都被當(dāng)成一個獨立的單詞.
  3. 注意:"$@"必須被""引用.
復(fù)制代碼

論壇徽章:
0
4 [報告]
發(fā)表于 2012-11-21 17:17 |只看該作者
回復(fù) 3# rdcwayx
謝謝斑竹~~~~~~~~~

   

論壇徽章:
0
5 [報告]
發(fā)表于 2012-11-21 18:51 |只看該作者
本帖最后由 力哥丶 于 2012-11-21 18:53 編輯

$@                 所有這些參數(shù)都分別被雙引號引住。若一個腳本接收到兩個參數(shù),$@等價于$1$2

^ 以誰為開頭。

^[^1] 除了1開頭的

論壇徽章:
0
6 [報告]
發(fā)表于 2012-11-30 11:39 |只看該作者
希望這樣的回答~~~回復(fù) 5# 力哥丶


   

論壇徽章:
0
7 [報告]
發(fā)表于 2014-05-10 21:52 |只看該作者
腳本名稱叫test.sh 入?yún)⑷齻: 1 2 3運行test.sh 1 2 3后$*為"1 2 3"(一起被引號包住)$@為"1" "2" "3"(分別被包。$#為3(參數(shù)數(shù)量)

論壇徽章:
0
8 [報告]
發(fā)表于 2014-05-10 21:54 |只看該作者
pdsh 是對集群進行批量操作的命令

論壇徽章:
0
9 [報告]
發(fā)表于 2014-05-10 21:56 |只看該作者
如果目標(biāo)前為“^”,則用來指示包含目標(biāo)主機的文件,文件中每行一個該機名
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP