#!/bin/bash
# create_barcode.sh
# sudo apt-get install barcode imagemagick
CODE=$1 #the code ... first parameter
FNAME=$2 #the filename .png .... second parameter (without file extension)
# let's create postscript:
barcode -E -b "$CODE" | convert -density 600 ps:- png:- > $FNAME
# use:
#
# bash create_barcode.sh 123456789 output.png #it autodetect's the preferable encoding
#
# this creates "output.png"
#
This script creates a barcode from ubuntu/linux command line (perhaps other distros).
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.