This is a Bash script that generates QR codes from a given URL using the qrencode command-line utility.
This script automatically installs qrencode
if it's not already present on your system.
However, you will need administrative privileges to install packages.
If you're prompted for a password during script execution, please provide it to allow the installation to proceed.
- Clone the repository:
git clone https://github.com/mdbentaleb/Dynamic_QR_Generator.git
- Make the script executable by running the following command:
chmod +x qrgen.sh
- Run the script with the following command:
./qrgen.sh <URL>
Replace with the URL you want to encode into a QR code.
./qrgen.sh "https://example.com"
- This will generate a QR code image file named
qr_code.png
in the current directory, encoding the URLhttps://example.com
If the QR code generation is successful, the script will print a message indicating the name of the generated QR code file. If it fails, an error message will be displayed.
- The script uses
sudo
to execute certain commands. If prompted for a password, it is expected behavior, and there is no need to be concerned. This is a standard security measure to ensure proper system maintenance.
This script is designed for personal use. Review the code before executing on critical systems.