Article 5A8QQ Bash pass parameters into a command from variables

Bash pass parameters into a command from variables

by
dazzpowder
from LinuxQuestions.org on (#5A8QQ)
Hi I have a command i would like to run that will require two parameters the directory of a keystore and the default label of a certificate. I can get the name of the directory easily enough and the default label of a certificate.
I have these stored as
dir=$(find ./*/ssl -type f -name *.kdb)
above will give me the path of the keystore db file
e.g output
a/ssl/file.kdb
b/ssl/file.kdb

then I have the labels stored as
label=for i in ls -ld */ssl; do runmqakm -cert -list all -db $i/*.kdb -stashed | grep -e 'nameoflabel*'| cut -f2;done
e.g output labela labelb labelc

but I need to add the corresponding directory from $dir and label from $label into a single command e.g

aCommndToRun -db $dir -label $label | grep -ie "not" -ie "cn"

Can anyone shed some light as to how I can format the variables in a way that can be used as positional parameters?

Thankslatest?d=yIl2AUoC8zA latest?i=aTjomaUun1A:10g1aXnkK7g:F7zBnMy latest?i=aTjomaUun1A:10g1aXnkK7g:V_sGLiP latest?d=qj6IDK7rITs latest?i=aTjomaUun1A:10g1aXnkK7g:gIN9vFwaTjomaUun1A
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments