If all lines in the input file are of this format, then simply sourcing it will set the variables:
source nameOfFileWithKeyValuePairs
or
. nameOfFileWithKeyValuePairs
More Related Contents:
- How to delete from a text file, all lines that contain a specific string?
- How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
- How to use SSH to run a local shell script on a remote machine?
- Find and replace in file and overwrite file doesn’t work, it empties the file
- What are the uses of the exec command in shell scripts? [closed]
- How can I reverse the order of lines in a file?
- Insert line after match using sed
- How to remove carriage return from a variable in shell script
- Using awk with variables
- Shell command to find lines common in two files
- How to get the second column from command output?
- How do I get the effect and usefulness of “set -e” inside a shell function?
- How can I negate the return-value of a process?
- Unix find command, what are the {} and \; for?
- How to exclude this / current / dot folder from find “type d”
- Losing newline after assigning grep result to a shell variable
- How to ssh to vagrant without actually running “vagrant ssh”?
- How to check if a process is running inside docker container?
- \r character in shell script
- Make a keybinding to run previous or last shell commands
- Shell one liner to prepend to a file
- How do I prevent root access to my docker container
- Remove part of path on Unix
- How to run a script at the start up of Ubuntu? [closed]
- Which terminal command to get just IP address and nothing else?
- How to add text at the end of each line in unix
- Command not found when comparing string
- How to print 5 consecutive lines after a pattern in file using awk [duplicate]
- how do I use the grep –include option for multiple file types?
- Batch convert latin-1 files to utf-8 using iconv