tcsh シェルを実行しています。
-l
オプションについて質問がありますset -l
。
manのコマンドを見ると、パラメータはset
表示されません。-l
tcshシェルを使用するときのパラメータの意味は何ですか-l
?
この情報はどこで、どのように見つけることができますか?
ベストアンサー1
あなたは間違った場所を見ています。これはtcsh(1)
マニュアルページから得られたものです:
set set name ... set name=word ... set [-r] [-f|-l] name=(wordlist) ... (+) set name[index]=word ... set -r (+) set -r name ... (+) set -r name=word ... (+) The first form of the command prints the value of all shell variables. Variables which contain more than a single word print as a parenthesized word list. The second form sets name to the null string. The third form sets name to the single word. The fourth form sets name to the list of words in wordlist. In all cases the value is command and filename expanded. If -r is specified, the value is set read-only. If -f or -l are specified, set only unique words keeping their order. -f prefers the first occurrence of a word, and -l the last.
したがって、にset -f list=(foo bar baz foo)
設定されます。list
(foo bar baz)
しかし、にset -l list=(foo bar baz foo)
設定されます。list
(bar baz foo)
set list=(foo bar baz foo)
)に設定して重複(foo bar baz foo
を維持します。
唯一の違いは、単語リストの重複項目を処理する方法です。この機能はclassic/realには存在せずcsh
、今や邪魔されないオープンソースであり(私の記憶が正しいなら)csh
多くのシステムの基本機能です。