Just include your .ini file into bash body:
File example.ini:
1 2 3 | DBNAME=test DBUSER=scott DBPASSWORD=tiger |
File example.sh
1 2 3 4 5 | #!/bin/bash #Including .ini file . example.ini #Test echo "${DBNAME} ${DBUSER} ${DBPASSWORD}" |
[ Source: https://stackoverflow.com/questions/6318809/how-do-i-grab-an-ini-value-within-a-shell-script ]
Keine Kommentare:
Kommentar veröffentlichen