Here's a README file for your project, detailing the functionalities of both the Python and Shell scripts:
This project includes two scripts for basic system management tasks: one written in Python and another in Bash (Shell). Both scripts provide functionalities for directory and file operations, process monitoring, and system interaction.
The Python script offers the following features:
- Create Directory: Create a new directory.
- Create File: Create a file and write a personalized message to it.
- Ping Test: Perform a network ping test to a specified host.
- Display Processes: Show ongoing processes using the
top
command.
-
Run the Script: Execute the Python script using Python 3.x.
python python_script.py
-
Follow the Prompts: The script will prompt you for your name and offer a menu of options:
- 1. Make Directory: Enter the name of the directory to create.
- 2. Make File: Enter the name of the file to create.
- 3. Ping Test: Enter the host to ping.
- 4. Display Processes: Show ongoing processes.
Enter your name: John
Welcome to our world, HI John
1. Make Directory
2. Make File
3. Ping Test
4. Display Processes
5. Exit
Enter the option: 1
Enter directory name: test_dir
test_dir created successfully
The Shell script provides similar functionalities with additional options for removing directories and files, and viewing process information with htop
and tree
.
-
Make the Script Executable:
chmod +x shell_script.sh
-
Run the Script:
./shell_script.sh
-
Follow the Prompts: The script will prompt for your name and offer a menu of options:
- 1. Make Directory: Enter the name of the directory to create.
- 2. Make File: Enter the name of the file to create.
- 3. Remove Directory and File: Enter the names of the directory and file to remove.
- 4.
htop
: Display ongoing processes usinghtop
. - 5.
tree
: Display directory structure usingtree
. - 6. Exit: Exit the script.
Enter your name:
John
Welcome user, John
1. Make Directory
2. Make File
3. Remove Directory and File
4. htop
5. tree
6. Exit
Enter option: 1
Enter directory name:
test_dir
Directory created successfully
- Python 3.x: Required for the Python script.
- Bash Shell: Required for the Shell script.
- htop and tree: Should be installed for Shell script functionality.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions and improvements are welcome. Please submit issues or pull requests on the GitHub repository.
Feel free to modify the README file according to your project's specifics and additional details as needed.