Unbuntu: Create barcode from command line.

#!/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) RND=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 32) TMP="/tmp/RND" # let's create postscript: barcode -E -b "$CODE" -o $TMP # convert to png convert -density 600 $TMP $FNAME.png # use: # # bash create_barcode.sh 123456789 output_barcode #it autodetect's the preferable encoding # # this creates "output_barcode.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.