In: Computer Science
What is the result of the command ?
$ who | grep $USER
$ grep \$HOME economics1
$ echo u*>> economics1
$ echo ‘u*’ >> economics1
$ . economicsA
$ set noclobber
$ set -o
$ chmod +x economics2
$ spell < economics1
economic is file name
linux command
who | grep $USER
who -shows who is log on
grep \$HOME economics1
show lines matching pattern
echo u*>> economics1
bash: economics1: Is a directory
echo ‘u*’ >> economics1
bash: economics1: Is a directory
. economicsA
shows is directory or not
set noclobber
When setting 'noclobber' overwriting the content of an existing file by the '>' redirection operator will not be possible. You might have typed '>' to redirect the output of a certain command to an existing file, while you intended to use '>>' redirection operator. This is where 'noclobber' comes in action, preventing you from accidentally deleting the content of the existing file.
set -o
-o option-name
Set the
variable corresponding to option-name:
allexport same as -a
braceexpand same as -B
emacs use an emacs-style
line editing interface
errexit same as -e
errtrace same as -E
functrace same as -T
hashall same as -h
histexpand same as -H
history enable command history
ignoreeof the shell will not exit upon reading
EOF
interactive-comments
allow comments to appear in interactive commands
keyword same as -k
monitor same as -m
noclobber same as -C
noexec same as -n
noglob same as -f
nolog currently accepted
but ignored
notify same as -b
nounset same as -u
onecmd same as -t
physical same as -P
pipefail the return value of a pipeline is
the status of
the last command to exit with a non-zero status,
or zero if no command exited with a non-zero status
posix change the behavior
of bash where the default
operation differs from the Posix standard to
match the standard
privileged same as -p
verbose same as -v
vi use
a vi-style line editing interface
xtrace same as -x
chmod +x
changes file permissions and set it to
allow executing as program
spell < economics1
prints the miss spell world in file