linux - How to extract a variable assignment from within a string -


i trying extract variable assignment file defined within larger string in external file /home/user/file.txt:

export os_username=xxxxx 

i want "source" file , pull variable assignment script treats as:

os_username=xxxxx 

i pipe variable command running on script.

config -- "$os_username" --test --run 

can explain me how can pull variable assignment external file?

in script

#! /bin/bash  source /path/to/file.txt # variables set command command ... 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -