set Flashcards

1
Q

set

A

Set or unset values of shell options and positional parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

set

  • a
  • b
  • e
  • f
  • h
A
  • a, Mark variables which are modified or created for export.
  • b, Notify of job termination immediatedly.
  • e, Exit immediately if a command exits with a non-zero status.
  • f, Disable file name generation (globbing).
  • h, Remember the location of commands as they are looked up.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

set

  • k
  • m
  • n
  • o
A
  • k, All assignment arguments are placed in the environment for a command, not just those that precede the command name.
  • m, Job control is enabled.
  • n, Read commands but do not execute them.
  • o, Option-name. Set a variable corresponding to an option-name.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

set -o option-name

allexport or -a

braceexpand or -B

emacs, use an emacs-style line editing interface

errexit or -e

errtrace or -E

functrace or -T

A

set -o option-name

hashall or -h

histexpand or -H

history, Enable command history

ignoreeof, The shell will not exit upon reading EOF

interactive-comments, allow comments to appear in interactive commands

keyword -k

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

set -o option-name

monitor or -m

noclobber or -C

noexec or -n

noglob or -f

nolog, Currently accepted but ignored

notify or -b

A

set -o option-name

nounset or -u

onecmd or -t

physical or -P

pipefail, The return value of a pipeline is the status of the last command to exit with a non-zero status.

posix, Change the behavior of bash where the default operation differs from the Posix standard to match the standard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

set -o option-name

privilledged or -p

verbose or -v

A

set -o option-name

vi, use a vi-style line editing interface

xtrace or -x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

set

  • p
  • t
  • u
A
  • p, Turned on whenever the real and effective user ids do not match. Disables processing of the $ENV file and importing of shell functions. Turning this option off causes the effective uid and gid to be set to the real uid and gid.
  • t, Exit after reading and executing one command.
  • u, Treat unset variables as an error when substituting.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

set

  • v
  • x
  • B
  • C
A
  • v, Print shell input lines as they read.
  • x, Print commands and their arguments as they are executed.
  • B, The shell will perform brace expansion.
  • C, If set, disallow existing regular files to be overwritten by redirection of output.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

set

  • E
  • H
  • P
  • T
A
  • E, If set, the ERR trap is inherited by shell functions.
  • H, Enable ! style history substitution. This flag is on by default when the shell is interactive.
  • P, If set, do not resolve symbolic links when executing commands such as cd which change the current directory.
  • T, If set, the DEBUG and RETURN traps are inherited by shell functions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly