1
我試圖運行使用別名的xargs的命令。搜索想出了這個別名xargs的採購tcsh的
alias gojk 'stsq \!:1 | xargs -t -0 -I {} tcsh -c source ~/.tcshrc.user;myset {}'
但它返回
Bad ! arg selector
和變化都將返回
source: too few arguments.
我試圖運行使用別名的xargs的命令。搜索想出了這個別名xargs的採購tcsh的
alias gojk 'stsq \!:1 | xargs -t -0 -I {} tcsh -c source ~/.tcshrc.user;myset {}'
但它返回
Bad ! arg selector
和變化都將返回
source: too few arguments.
使用-m
標誌tcsh
有它在啓動時讀取你~/.tcshrc
,如
... | xargs -t0 -I {} tcsh -m -c "<alias> {}"
tcsh仍然評估!引號內的字符。你需要在它之前加一個反斜槓。
我建議你讓tcsh部分成爲一個腳本,在那裏你傳遞一個參數,並讓它工作。然後使用xargs調用腳本。