|
Kansas State University at Salina Introduction to Unix |
|
Linux for Programmers and Users, Sections 6.3 and 6.4.2
Without options, the name and value of each shell variable are displayed in a format that can be reused as input. The output is sorted according to the current locale. When options are specified, they set or unset shell attributes. Any arguments remaining after the options are processed are treated as values for the positional parameters and are assigned, in order, to $1, $2, ... $n.
OPTIONS:
- -o option-name¶
See the help or man page for more details. set -o vi is especially useful to get vi-style command line editing.
- --¶
If no arguments follow this option, then the positional parameters are unset. Otherwise, the positional parameters are set to the args, even if some of them begin with a -.
For example, the following command with set the positional parameters to the columnms from output of ls -l.
set -- $(ls -l $file)