I searched for my problem on google and found following solution: How to concatenate string variables in Bash? would have been cool if it had been that easy, but apparently there must be an exception for my problem. I have a shell script with a variable which looks like following
#!/bin/bash
egrep "CN=$1/" index.txt|awk '{print $3}'
userpem="$3.pem"
openssl x509 -in $userpem -noout -text
unfortunately it just gives out .pem. Do you have any suggestions why this happens?