- Author Details
- Project Description
- Tasks
- 0.
- 1. Hello you
- 2. The path to success is to take massive, determined action
- 3. If the path be beautiful, let us not ask where it leads
- 4. Global variables
- 5. Local variables
- 6. Local variable
- 7. Global variable
- 8. Every addition to true knowledge is an addition to human power
- 9. Divide and rule
- 10. Love is anterior to life, posterior to death, initial of creation, and the exponent of breath
- 11. There are 10 types of people in the world -- Those who understand binary, and those who don't
- 12. Combination
- 13. Floats
- 14. Decimal to Hexadecimal
- 15. Everyone is a proponent of strong encryption
- 16. The eggs of the brood need to be an odd number
- 17. I'm an instant star. Just add water and stir.
- Dean Robin Otsyeno - [email protected]
- Allowed editors:
vi
,vim
,emacs
- All your scripts will be tested on Ubuntu 20.04 LTS
- All your scripts should be exactly two lines long (
$ wc -l file
should print 2) - All your files should end with a new line (why?)
- The first line of all your files should be exactly
#!/bin/bash
- A
README.md
file, at the root of the folder of the project, describing what each script is doing - You are not allowed to use
&&
,||
or;
- You are not allowed to use
bc
,sed
orawk
- All your files must be executable
- Read your
/etc/profile
,/etc/inputrc
and~/.bashrc
files. - Look at some files in the
/etc/profile.d
directory.
0.
- Create a script that creates an alias.
- Name:
ls
- Value:
rm *
- Name:
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
0-alias
- GitHub repository:
1. Hello you
- Create a script that prints
hello user
, where user is the current Linux user.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
1-hello_you
- GitHub repository:
2. The path to success is to take massive, determined action
- Add
/action
to thePATH
./action
should be the last directory the shell looks into when looking for a program.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
2-path
- GitHub repository:
3. If the path be beautiful, let us not ask where it leads
- Create a script that counts the number of directories in the
PATH
.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
3-paths
- GitHub repository:
4. Global variables
- Create a script that lists environment variables.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
4-global_variables
- GitHub repository:
5. Local variables
- Create a script that lists all local variables and environment variables, and functions.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
5-local_variables
- GitHub repository:
6. Local variable
- Create a script that creates a new local variable.
- Name:
BEST
- Value:
School
- Name:
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
6-create_local_variable
- GitHub repository:
7. Global variable
- Create a script that creates a new global variable.
- Name:
BEST
- Value:
School
- Name:
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
7-create_global_variable
- GitHub repository:
8. Every addition to true knowledge is an addition to human power
- Write a script that prints the result of the addition of 128 with the value stored in the environment variable
TRUEKNOWLEDGE
, followed by a new line.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
8-true_knowledge
- GitHub repository:
9. Divide and rule
- Write a script that prints the result of
POWER
divided byDIVIDE
, followed by a new line.POWER
andDIVIDE
are environment variables
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
9-divide_and_rule
- GitHub repository:
10. Love is anterior to life, posterior to death, initial of creation, and the exponent of breath
- Write a script that displays the result of
BREATH
to the powerLOVE
BREATH
andLOVE
are environment variables- The script should display the result, followed by a new line
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
10-love_exponent_breath
- GitHub repository:
11. There are 10 types of people in the world -- Those who understand binary, and those who don't
- Write a script that converts a number from base 2 to base 10.
- The number in base 2 is stored in the environment variable
BINARY
- The script should display the number in base 10, followed by a new line
- The number in base 2 is stored in the environment variable
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
11-binary_to_decimal
- GitHub repository:
12. Combination
- Create a script that prints all possible combinations of two letters, except
oo
.- Letters are lower cases, from
a
toz
- One combination per line
- The output should be alpha ordered, starting with
aa
- Do not print
oo
- Your script file should contain maximum 64 characters
- Letters are lower cases, from
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
12-combinations
- GitHub repository:
13. Floats
- Write a script that prints a number with two decimal places, followed by a new line.
- The number will be stored in the environment variable
NUM
.
- The number will be stored in the environment variable
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
13-print_float
- GitHub repository:
14. Decimal to Hexadecimal
- Write a script that prints a number with two decimal places, followed by a new line.
- The number will be stored in the environment variable
NUM
.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
100-decimal_to_hexadecimal
- GitHub repository:
15. Everyone is a proponent of strong encryption
- Write a script that encodes and decodes text using the rot13 encryption. Assume ASCII.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
101-rot13
- GitHub repository:
16. The eggs of the brood need to be an odd number
- Write a script that prints every other line from the input, starting with the first line.
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
102-odd
- GitHub repository:
17. I'm an instant star. Just add water and stir.
- Write a shell script that adds the two numbers stored in the environment variables
WATER
andSTIR
and prints the result.WATER
is in basewater
STIR
is in basestir.
- The result should be in base
bestchol
- Repo
- GitHub repository:
alx-system_engineering-devops
- Directory:
0x03-shell_variables_expansions
- File:
103-water_and_stir
- GitHub repository:
Dean Robin Otsyeno - [email protected]