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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -