Entrance test

Language?

What language will you prefer for the course? EN or CZ? You can answer the following questions in your prefered language.

I'm a native Czech speaker, so the course in Czech will have a higher level :)

Number of parameters

Consider a following files. Filename ending with / is a directory. Each name is on one line.

Folder/
regular file
.config
picture.jpg
So we have 4 files. How many parameters we will pass to command cmd in following statements?
  1. cmd *
  2. var=*; cmd $var
  3. var=*; cmd "$var"
  4. cmd $foo
  5. cmd $(ls *)

Coreutils

Give me a short description what are following commands doing?

  1. ls
  2. cd
  3. cp
  4. mv

Redirection

One of the bash features is redirection. Consider a command cmd. How you will make following redirections?

  1. Redirect stdout and stderr to file /tmp/a.tmp
  2. Redirect stdin from file stored in FOO variable

Brace expansion

Another feature is brace expansion. Consider following statement

a{b,e}{1..2}c

What will bash construct? What will be the "output"?

Pipeline

foo|bar|baz

The above is one pipeline. What is the pipeline? What is bash doing with it?


If anyone is in doubt how the answers should look like, you can use types like in answers.html