how to generate unique string

前端 未结 4 560
广开言路
广开言路 2020-12-20 18:29

I want to transform an XML document into HTML. Some XML elements have links to others documents like:


In the H

4条回答
  •  -上瘾入骨i
    2020-11-21 01:13

    You could pass in the command-line option -v with a variable name (v) and a value (=) of the environment variable ("${v}"):

    % awk -vv="${v}" 'BEGIN { print v }'
    123test
    

    Or to make it clearer (with far fewer vs):

    % environment_variable=123test
    % awk -vawk_variable="${environment_variable}" 'BEGIN { print awk_variable }'
    123test
    

提交回复
热议问题