Add a readme

This commit is contained in:
2021-10-26 17:59:39 +02:00
parent 034f03cb68
commit a609d82249
3 changed files with 22 additions and 0 deletions

21
README.md Normal file
View File

@@ -0,0 +1,21 @@
## What's this?
`getenv` will fetch GCE metadata attributes and print them as K=V pairs ready to be `exported` as environment variables.
Example:
```bash
./getenv
MY_VARIABLE=SOMEVALUE
```
#### How to use
Export all metadata attributes as ENV variables for current shell session and store them in /etc/environment for future sessions:
```bash
export $(./getenv)
./getenv >> /etc/environment
```
or
```bash
./getenv >> /etc/environment
source /etc/environment
```