AnkiLab
Sign in

Filter by tags:

linuxadd more tags...

265 cards matching

Showing cards 1-20 of 265
Front
execute the string str as a command
lang
sh
Back
eval str
Front
"everything except file1"
lang
sh
Back
[^file1]*
Front
how do you redirect to standard error?
lang
sh
Back
>&2
Front
How do you make your script clean up itself after it receives a termination signal?
lang
sh
Back
create a clean_up() function that cleans things up, and write at the beginning of the program:

trap clean_up SIGNALS TO INTERCEPT

(e.g. trap clean_up SIGHUP SIGINT SIGTERM)
Front
What does (command) mean?
lang
sh
Back
command is run in a subshell. Variable declarations and directory changes won't persist in the current shell.
Front
run a command in a subshell
lang
sh
Back
(command)
Front
find: execute command1 and command2
lang
sh
Back
find ... -exec command1 \; -exec command2 \;
Front
given variable string, with spaces, retrieve its first word
lang
sh
Back
echo $string | awk '{print $1;}'
Front
(awk) what is $0?
lang
sh
Back
the whole string
Front
for i in ...; do

iterate over range [1, 100]
lang
sh
Back
{1..100}
Front
for i in ...; do

iterate over range [100, 1] (decreasing)
lang
sh
Back
{100..1}
Front
difference between chmod and chown
lang
sh
Back
chmod: changes the permission for user, group, other
chown: changes who is the user and the group
Front
what happens to errors in scripts by default?
lang
sh
Back
they're ignored
Front
explain <<
lang
sh
Back
here document. Used like this:
<< UNIQUE
...
UNIQUE
Front
explain <<<
lang
sh
Back
here string.

command <<< string
is equivalent to
echo string | command
Front
difference between << and <<<
lang
sh
Back
<< begins a here document (multi-line, unique token)
<<< begins a here string (one line)
Front
reuse the last command in current command
lang
sh
Back
!! (then space or tab to expand)
Front
show all environment variables
lang
sh
Back
env
Front
what's &>
lang
sh
Back
redirect both stdout and stderr
Front
loop over a range (e.g. a-z)
lang
sh
Back
for i in {a..z}
Showing cards 1-20 of 265