Skip to main content

create environment variables from text files

Project description

Install

$ [sudo] pip install export-file

Features

  • create environment variables from text files - filename as variable name, content as value
  • ignore not existing and empty files

Usage

usage: export-file path ...

Examples

$ export-file description.txt keywords.txt
export DESCRIPTION="@accepts decorator to check arguments types"
export KEYWORDS="type decorator"

$ eval <<< export-file description.txt keywords.txt
$ echo $DESCRIPTION
repo description

find files:

$ IFS=;find="$(find -H . -type f -name "*.txt")"
$ [[ -n "$find ]] && { IFS=$'\n';set $find; eval "$(export-file "$@")"; }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

export-file-0.0.1.tar.gz (1.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page