0

I have a script and a file text containing variables for this script in the same directory. I need to read these variables but without this

. /path_to_my_file.file.txt

I don't want any paths inside my script.Doing this does not work

. file.txt

So what other possibilities i have?

HobbitOfShire
  • 2,144
  • 5
  • 24
  • 41

1 Answers1

1

See this question how to find out in which folder a script is: Unix shell script find out which directory the script file resides?

Afterwards, you can use this path to source your "config" file.

Community
  • 1
  • 1
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820