F
F
fokin_nikolay19892016-09-28 19:54:03
linux
fokin_nikolay1989, 2016-09-28 19:54:03

How to get the license key?

There is such an option

/opt/cprocsp/sbin/amd64/cpconfig -license -view | awk '{print $1}' | tail -n

but it gives me 2 lines
mnt]# /opt/cprocsp/sbin/amd64/cpconfig -license -view | awk '{print $1}' | tail -n2
XXXXX-YYYYY-AAAAA-ZZZZZ- FFFFF
license

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2016-09-28
@fokin_nikolay1989

/opt/cprocsp/sbin/amd64/cpconfig -license -view | awk '{print $1}' | tail -n 2 | head -n 1

S
Swartalf, 2016-09-29
@Swartalf

And why not through the regulak in grep?
something like
/opt/cprocsp/sbin/amd64/cpconfig -license -view | grep -Eo '[AX]{5,5}-[AX]{5,5}-[AX]{5,5}-[AX]{5,5}-[AX]{5,5}'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question