I'm running a tcsh shell.
I have questions about the
-l option in
When I look at man for the
set command, I don't see the
When using tcsh shell, what does the
-l argument mean?
Where & how can I find this info?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You're looking at the wrong place. This is from the
tcsh(1) manual page:
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) will set
(foo bar baz),
set -l list=(foo bar baz foo) will set
(bar baz foo),
set list=(foo bar baz foo) will set it to
(foo bar baz foo), keeping duplicates.
The only difference is how it handles duplicates in the word list. This feature is not present in the classical/real
csh, which is now unencumbered open-source itself and (if I'm not mistaken) the default
csh on many systems.
In the manual for the TENEX C shell, rather than the manual for
set. The relevant part of the TENEX C shell manual has
-l fourth in its synopses for the
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 ... (+)and discusses it in the description that follows.
Look up shell builtins in the manual for the shell that they are built in to. The manual page for
set that you looked at might have told you to do this. FreeBSD's manual for
set certainly does:
SYNOPSIS See the built-in command description in the appropriate shell manual page.