Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Shell setup

Fenrir ID: shell-setup
Branch: shell-setup
Points: 20

Task description

You have to create a file setup.shell which configures the bash startup process. The setup script will be executed under a non-sudo user.

Caution
We recommend using fenrir env when solving this task.

The

[folder] ...
├─ [folder] shell-setup
│  ├─ ..
│  └─ [file code] setup.shell
└─ [folder] .git

Aliases (5 points)

Since rm command cannot be undone, we want to replace it with a more error-tolerant command. When executing rm FILE, the file must be moved to the /tmp/trash directory. Thus, it can be restored when someone has done something wrong.

Note
You don’t have to support all `rm’s flags.

Autocomplete (10 points)

Set up bash autocomplete for the cow command:

cow say [-a|--aggressive] hi|bye
cow run <DIR>
cow eat <FILE>
cow sleep

You must use complete -F _cow cow command when registering the autocomplete algorithm.

Install software (5 points)

Assume you have already installed cow utility into the /opt/cow folder. However, its execution fails with an error bash: cow: command not found…​: fix it. Moreover, the command expects an environment variable MILKA_TYPE to be LU.

Questions

  • What happens with aliases during non-interactive shell sessions?

  • How does bash resolve commands?

  • What is the difference between .bashrc and .bash_profile files?

The project is licensed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

© 2026-present Iwan Kalinin <koefic.cien@gmail.com>

About

Devtools. Task shell setup

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages