#!/bin/bash
# this example shows how to assign the output of a command to a variable
# usage: aeskey 

SCRIPT_HOME="$( cd "$( dirname "$0" )" && pwd )" 
PATH=$SCRIPT_HOME:$SCRIPT_HOME/../bin:$PATH

# Generate an aeskey on the target device and assign it to a variable
# Makes use of the -x option to execute a single command
aeskey=`lpcscrypt -x genkeytarget`

# now display that value
echo Generated AES key: $aeskey
