TechCorp Development Environment
TechCorp uses a custom script called devtool
for their development workflow. This tool needs to be accessible from anywhere in the system. Additionally, the team uses a specific configuration file that needs to be referenced by an environment variable.
Tasks
- Create a directory named
techcorp_tools
in your home directory.
- Create a simple bash script named
devtool
in the techcorp_tools
directory that prints "TechCorp DevTool v1.0" when executed.
- Make the
devtool
script executable.
- Add the
techcorp_tools
directory to your PATH so that devtool
can be run from anywhere. Immediately apply this change to your current session.
- Append the export command to
.zshrc
to set up this environment variable permanently.
- Create a file named
techcorp_config.json
in your home directory with the content: {"env": "development"}
.
- Create an environment variable named
TECHCORP_CONFIG
that points to the full path of the techcorp_config.json
file.
- Make sure the
TECHCORP_CONFIG
environment variable is available in all new shell sessions.
Hints
- Remember to use
export
when setting environment variables.
- Don't forget to make your script executable with
chmod
.
- Use
$HOME
or ~
to refer to your home directory when setting paths.
source ~/.zshrc
reloads the .zshrc
file.
Example
After completing the tasks, you should be able to run the following commands from any directory:
$ devtool
TechCorp DevTool v1.0
$ echo $TECHCORP_CONFIG
/home/labex/techcorp_config.json