0

I want to export many paths using a .sh script. after running it nothing is exported I don't know why. so if anyone can advise. This is the script used:

#!/bin/bash

txtrst=$(tput sgr0) # Text reset
txtred=$(tput setaf 1) # Red
echo "${txtred}## vars ##${txtrst}" 

T_D_L=/home/
T_D=$T_D_L

after that I use echo $T_D_L but nothing happens

1 Answer 1

4

I was using ./script.sh to run, and the correct way is source script.sh

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .