Skip to content

Latest commit

 

History

History

README.md

Shell, init files, variables and expansions

In this project, I learned about initialization files, local, global, and reserved variables, and special parameters in the Shell. Further, I practiced using expansions, performing arithmetic operations, and utilizing aliases.

Tasks 📃

  • 0.

    • 0-alias: Bash script that creates an alias named ls with value rm *.
  • 1. Hello you

    • 1-hello_you: Bash script that prints hello user, where user is the current Linux user.
  • 2. The path to success is to take massive, determined action

    • 2-path: Bash script that adds /action to the PATH.
  • 3. If the path be beautiful, let us not ask where it leads

    • 3-paths: Bash script that counts the number of directories in the PATH.
  • 4. Global variables

  • 5. Local variable

    • 5-local_variables: Bash script that lists all local variables, environment variables and functions.
  • 6. Local variable

  • 7. Global variable

  • 8. Every addition to true knowledge is an addition to human power

    • 8-true_knowledge: Bash script that prints the result of the addition of 128 with the value stored in the environment variable TRUEKNOWLEDGE, followed by a new line.
  • 9. Divide and rule

    • 9-divide_and_rule: Bash script that prints the result of POWER divided by DIVIDE. POWER and DIVIDE are environment variables.
  • 10. Love is anterior to life, posterior to death, initial of creation, and the exponent of breath

    • 10-love_exponent_breath: Bash script that displays the result of BREATH to the power of LOVE. BREATH and LOVE are environment variables.
  • 11. There are 10 types of people in the world -- Those who understand binary, and those who don't

    • 11-binary_to_decimal: Bash script that converts a number in base 2 stored in the environment variable BINARY to base 10.
  • 12. Combination

    • 12-combinations: Bash script that prints all possible combinations of two letters, except oo, as follows:
      • Letters are lower cases, from a to z.
      • One combination per line.
      • Alpha-ordered.
  • 13. Floats

    • 13-print_float: Bash script that prints a number stored in the environment variable NUM with two decimal places.
  • 100. Decimal to Hexadecimal

    • 100-decimal_to_hexadecimal: Bash script that converts a number in base 10 stored in the environment variable DECIMAL to base 16.
  • 101. Everyone is a proponent of strong encryption

    • 101-rot13: Bash script that encodes and decodes text using the rot13 encryption.
  • 102. The eggs of the brood need to be an odd number

    • 102-odd: Bash script that prints every other line from the input, starting with the first line.
  • 103. I'm an instant star. Just add water and stir.

    • 103-water_and_stir: Bash script that adds the two numbers stored in the environment variables WATER and STIR and prints the result.
    • WATER is in base water, STIR is in base stir, and the result is in base behlnort.

Author ✒️

Acknowledgements 🙏

All work contained in this project was completed as part of the curriculum for ALX School. ALX School is a campus-based full-stack software engineering program that prepares students for careers in the tech industry using project-based peer learning. For more information, visit this link.

ALX School logo