How to set multiple env variables? [closed]

Clash Royale CLAN TAG#URR8PPP
up vote
-3
down vote
favorite
I have to set 10 env variables (setenv). I saved all these env variable in a filename.env. Is there a way to set all the variable inside the file with single command ?
I tried with "source filename.env", variables are getting set but many other things are also happening. Doubt what I did is wrong. Please help.
Edit:
content of filename.env:
setenv variable1 value1
setenv variable2 value2
.
.
setenv variable10 value10
environment-variables set
closed as unclear what you're asking by Jeff Schaller, jimmij, Fox, mdpc, Rui F Ribeiro Jan 16 at 1:00
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
-3
down vote
favorite
I have to set 10 env variables (setenv). I saved all these env variable in a filename.env. Is there a way to set all the variable inside the file with single command ?
I tried with "source filename.env", variables are getting set but many other things are also happening. Doubt what I did is wrong. Please help.
Edit:
content of filename.env:
setenv variable1 value1
setenv variable2 value2
.
.
setenv variable10 value10
environment-variables set
closed as unclear what you're asking by Jeff Schaller, jimmij, Fox, mdpc, Rui F Ribeiro Jan 16 at 1:00
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
4
WhatâÂÂs in the file and what, exactly, are the âÂÂmany other things?âÂÂ
â Jeff Schaller
Jan 15 at 13:22
4
Why not add the content of your.envfile to your question?
â Weijun Zhou
Jan 15 at 13:26
3
What shell are you using? csh?
â ilkkachu
Jan 15 at 13:32
using cshc @ilkkachu
â tollin jose
Jan 16 at 12:07
add a comment |Â
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
I have to set 10 env variables (setenv). I saved all these env variable in a filename.env. Is there a way to set all the variable inside the file with single command ?
I tried with "source filename.env", variables are getting set but many other things are also happening. Doubt what I did is wrong. Please help.
Edit:
content of filename.env:
setenv variable1 value1
setenv variable2 value2
.
.
setenv variable10 value10
environment-variables set
I have to set 10 env variables (setenv). I saved all these env variable in a filename.env. Is there a way to set all the variable inside the file with single command ?
I tried with "source filename.env", variables are getting set but many other things are also happening. Doubt what I did is wrong. Please help.
Edit:
content of filename.env:
setenv variable1 value1
setenv variable2 value2
.
.
setenv variable10 value10
environment-variables set
edited Jan 16 at 12:18
peterh
3,93092755
3,93092755
asked Jan 15 at 13:15
tollin jose
984
984
closed as unclear what you're asking by Jeff Schaller, jimmij, Fox, mdpc, Rui F Ribeiro Jan 16 at 1:00
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by Jeff Schaller, jimmij, Fox, mdpc, Rui F Ribeiro Jan 16 at 1:00
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
4
WhatâÂÂs in the file and what, exactly, are the âÂÂmany other things?âÂÂ
â Jeff Schaller
Jan 15 at 13:22
4
Why not add the content of your.envfile to your question?
â Weijun Zhou
Jan 15 at 13:26
3
What shell are you using? csh?
â ilkkachu
Jan 15 at 13:32
using cshc @ilkkachu
â tollin jose
Jan 16 at 12:07
add a comment |Â
4
WhatâÂÂs in the file and what, exactly, are the âÂÂmany other things?âÂÂ
â Jeff Schaller
Jan 15 at 13:22
4
Why not add the content of your.envfile to your question?
â Weijun Zhou
Jan 15 at 13:26
3
What shell are you using? csh?
â ilkkachu
Jan 15 at 13:32
using cshc @ilkkachu
â tollin jose
Jan 16 at 12:07
4
4
WhatâÂÂs in the file and what, exactly, are the âÂÂmany other things?âÂÂ
â Jeff Schaller
Jan 15 at 13:22
WhatâÂÂs in the file and what, exactly, are the âÂÂmany other things?âÂÂ
â Jeff Schaller
Jan 15 at 13:22
4
4
Why not add the content of your
.env file to your question?â Weijun Zhou
Jan 15 at 13:26
Why not add the content of your
.env file to your question?â Weijun Zhou
Jan 15 at 13:26
3
3
What shell are you using? csh?
â ilkkachu
Jan 15 at 13:32
What shell are you using? csh?
â ilkkachu
Jan 15 at 13:32
using cshc @ilkkachu
â tollin jose
Jan 16 at 12:07
using cshc @ilkkachu
â tollin jose
Jan 16 at 12:07
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
in bash:
With the following file ~/variables.rc:
export test1="test1"
export test2="test2"
export test3="test3"
export test4="test4"
export test5="test5"
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test3
in csh:
With the following file ~/variables.rc:
setenv test1 test10
setenv test2 test20
setenv test3 test30
setenv test4 test40
setenv test5 test50
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test30
if "setenv" instead of "export" same working ?
â tollin jose
Jan 16 at 10:00
It depends on your shell: unix.stackexchange.com/questions/368944/â¦
â Kevin Lemaire
Jan 16 at 10:15
What shell are you using?
â Kevin Lemaire
Jan 16 at 10:15
1
I am using cshc @kevin
â tollin jose
Jan 16 at 12:07
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
in bash:
With the following file ~/variables.rc:
export test1="test1"
export test2="test2"
export test3="test3"
export test4="test4"
export test5="test5"
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test3
in csh:
With the following file ~/variables.rc:
setenv test1 test10
setenv test2 test20
setenv test3 test30
setenv test4 test40
setenv test5 test50
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test30
if "setenv" instead of "export" same working ?
â tollin jose
Jan 16 at 10:00
It depends on your shell: unix.stackexchange.com/questions/368944/â¦
â Kevin Lemaire
Jan 16 at 10:15
What shell are you using?
â Kevin Lemaire
Jan 16 at 10:15
1
I am using cshc @kevin
â tollin jose
Jan 16 at 12:07
add a comment |Â
up vote
1
down vote
in bash:
With the following file ~/variables.rc:
export test1="test1"
export test2="test2"
export test3="test3"
export test4="test4"
export test5="test5"
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test3
in csh:
With the following file ~/variables.rc:
setenv test1 test10
setenv test2 test20
setenv test3 test30
setenv test4 test40
setenv test5 test50
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test30
if "setenv" instead of "export" same working ?
â tollin jose
Jan 16 at 10:00
It depends on your shell: unix.stackexchange.com/questions/368944/â¦
â Kevin Lemaire
Jan 16 at 10:15
What shell are you using?
â Kevin Lemaire
Jan 16 at 10:15
1
I am using cshc @kevin
â tollin jose
Jan 16 at 12:07
add a comment |Â
up vote
1
down vote
up vote
1
down vote
in bash:
With the following file ~/variables.rc:
export test1="test1"
export test2="test2"
export test3="test3"
export test4="test4"
export test5="test5"
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test3
in csh:
With the following file ~/variables.rc:
setenv test1 test10
setenv test2 test20
setenv test3 test30
setenv test4 test40
setenv test5 test50
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test30
in bash:
With the following file ~/variables.rc:
export test1="test1"
export test2="test2"
export test3="test3"
export test4="test4"
export test5="test5"
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test3
in csh:
With the following file ~/variables.rc:
setenv test1 test10
setenv test2 test20
setenv test3 test30
setenv test4 test40
setenv test5 test50
You can source the file. Those sourced variables are then known in your terminal session:
[ws] user ~ >source variables.rc
[ws] user ~ >echo $test3
test30
edited Jan 16 at 13:36
answered Jan 15 at 16:23
Kevin Lemaire
1,037421
1,037421
if "setenv" instead of "export" same working ?
â tollin jose
Jan 16 at 10:00
It depends on your shell: unix.stackexchange.com/questions/368944/â¦
â Kevin Lemaire
Jan 16 at 10:15
What shell are you using?
â Kevin Lemaire
Jan 16 at 10:15
1
I am using cshc @kevin
â tollin jose
Jan 16 at 12:07
add a comment |Â
if "setenv" instead of "export" same working ?
â tollin jose
Jan 16 at 10:00
It depends on your shell: unix.stackexchange.com/questions/368944/â¦
â Kevin Lemaire
Jan 16 at 10:15
What shell are you using?
â Kevin Lemaire
Jan 16 at 10:15
1
I am using cshc @kevin
â tollin jose
Jan 16 at 12:07
if "setenv" instead of "export" same working ?
â tollin jose
Jan 16 at 10:00
if "setenv" instead of "export" same working ?
â tollin jose
Jan 16 at 10:00
It depends on your shell: unix.stackexchange.com/questions/368944/â¦
â Kevin Lemaire
Jan 16 at 10:15
It depends on your shell: unix.stackexchange.com/questions/368944/â¦
â Kevin Lemaire
Jan 16 at 10:15
What shell are you using?
â Kevin Lemaire
Jan 16 at 10:15
What shell are you using?
â Kevin Lemaire
Jan 16 at 10:15
1
1
I am using cshc @kevin
â tollin jose
Jan 16 at 12:07
I am using cshc @kevin
â tollin jose
Jan 16 at 12:07
add a comment |Â
4
WhatâÂÂs in the file and what, exactly, are the âÂÂmany other things?âÂÂ
â Jeff Schaller
Jan 15 at 13:22
4
Why not add the content of your
.envfile to your question?â Weijun Zhou
Jan 15 at 13:26
3
What shell are you using? csh?
â ilkkachu
Jan 15 at 13:32
using cshc @ilkkachu
â tollin jose
Jan 16 at 12:07