This repository contains weekly lab assignments for the Shell Scripting course for BTech 3rd year CSE. Each directory corresponds to a specific week's assignment, with the associated scripts and documentation.
To work with the scripts in this repository, it's recommended to use Visual Studio Code (VS Code). VS Code provides a powerful and user-friendly environment for editing and debugging shell scripts.
-
Download VS Code:
- Go to the VS Code download page.
- Choose the version suitable for your operating system (Windows, macOS, or Linux) and download the installer.
-
Install VS Code:
- Windows: Run the downloaded installer and follow the on-screen instructions.
- macOS: Open the downloaded
.dmg
file and drag the VS Code icon to the Applications folder. - Linux: Follow the instructions on the VS Code documentation for your specific Linux distribution.
-
Setup VS Code for Shell Scripting:
-
Install Shell Script Extensions:
- Open VS Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or pressing
Ctrl+Shift+X
(Windows/Linux) orCmd+Shift+X
(macOS). - Search for and install the following extensions:
- Shell Script: Provides syntax highlighting and other features for shell scripting.
- Bash IDE: Adds advanced features like code linting and debugging support.
-
Configure VS Code for Shell Scripting:
- Open the command palette by pressing
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(macOS). - Type
Shell Script
and selectShell Script: Create New Shell Script
to set up your workspace for shell scripting.
- Open the command palette by pressing
-
-
Optional: Install Additional Tools
- You might also want to install additional tools or extensions based on your specific needs. For more information, refer to the VS Code documentation.
For an enhanced shell scripting experience, it is recommended to use Git Bash, which provides a Unix-like shell environment on Windows.
-
Download Git Bash:
- Go to the Git for Windows download page.
- The download should start automatically. If not, click on the provided link to manually download the installer.
-
Install Git Bash:
- Windows:
- Run the downloaded installer (
Git-<version>-<arch>.exe
). - Follow the installation prompts. You can generally accept the default settings, but make sure to choose "Git Bash Here" during the installation process for easier access to Git Bash from the context menu.
- Run the downloaded installer (
- Windows:
-
Setup Git Bash:
-
Basic Configuration:
- Open Git Bash by searching for it in the Start menu or right-clicking in a directory and selecting “Git Bash Here.”
- You can customize your Git Bash environment by editing the
.bashrc
file located in your home directory (~
).
-
Optional: Install Additional Tools
- You might want to install additional tools or extensions depending on your needs. For example, you can install Git-related tools or utilities that enhance your scripting experience.
-
-
Using Git Bash:
-
To run a shell script, navigate to the directory containing your script and execute it with the following command:
bash script_name.sh
-
Ensure you have the necessary permissions to execute the script. You can modify the permissions using:
chmod +x script_name.sh
-
- For more detailed instructions and advanced configuration, refer to the Git for Windows documentation.
We welcome contributions to this project! If you'd like to contribute, please follow these guidelines:
-
Fork the Repository:
- Click the "Fork" button at the top right of this repository page to create a copy of this repository under your GitHub account.
-
Clone Your Fork:
-
Clone your forked repository to your local machine using the following command:
git clone https://github.com/your-username/your-repo.git
-
-
Create a New Branch:
-
Create a new branch for your changes:
git checkout -b my-feature-branch
-
-
Make Your Changes:
- Make the necessary changes to the code or documentation. Ensure your changes follow the existing code style and conventions used in the project.
-
Commit Your Changes:
-
Commit your changes with a descriptive message:
git add . git commit -m "Add a brief description of the changes"
-
-
Push Your Changes:
-
Push your changes to your forked repository:
git push origin my-feature-branch
-
-
Create a Pull Request:
- Navigate to the original repository on GitHub and create a pull request from your forked repository. Provide a clear description of the changes and why they are being made.
If you find a bug or have a suggestion for improvement, please open an issue in the Issues section of this repository. Provide as much detail as possible, including steps to reproduce the issue and any relevant screenshots or error messages.
Please adhere to our Code of Conduct to ensure a positive and respectful community.
- Code Style: Follow the existing code style and conventions used in the repository.
- Commit Messages: Use clear and descriptive commit messages. Prefix your commit messages with the type of change (e.g.,
fix:
,feat:
,docs:
).
We'd like to express our gratitude to the open-source community for its invaluable contributions and support. This project benefits greatly from the collective efforts and shared knowledge of developers worldwide.
- GitHub: For providing a powerful platform for version control and collaboration. GitHub enables open-source projects to thrive by offering tools and a community that fosters innovation and collaboration.
- Open-Source Contributors: To all contributors who have shared their code, ideas, and expertise. Your dedication helps improve projects and fosters a collaborative spirit in the developer community.
- Git: For version control and managing project changes.
- Visual Studio Code: For its powerful and versatile code editor features that enhance development productivity.
- Git Bash: For providing a Unix-like shell environment on Windows, which aids in scripting and version control.
- Stack Overflow: For the wealth of knowledge and support provided by the programming community.
- Open-Source Documentation: For comprehensive guides and tutorials that help developers navigate and contribute to open-source projects.
Thank you to everyone who supports and contributes to open-source projects. Your efforts make a significant difference and help drive the future of technology.