How to automate a source command

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have to run a command every morning after I log on to the server to enable certain company specific functionalities.
The command looks like this:
source /data/dev/int/default/somethingsomething.env
Is there a way to automate this so I don't have to copy/paste it?
zsh environment-variables login source
add a comment |Â
up vote
0
down vote
favorite
I have to run a command every morning after I log on to the server to enable certain company specific functionalities.
The command looks like this:
source /data/dev/int/default/somethingsomething.env
Is there a way to automate this so I don't have to copy/paste it?
zsh environment-variables login source
What shell do you use?
â Jeff Schaller
Aug 15 at 0:46
zsh apparently, had no idea how to even check this till now
â solarflare
Aug 15 at 0:50
@Wildcard, I didn't see a zsh answer in there, so I went ahead and posted an Answer here.
â Jeff Schaller
Aug 15 at 1:00
The "duplicate" was about sourcing a tcsh script when opening a terminal (that starts a bash shell on CentOS), quite different here. The answers there certainly don't apply here.
â Stéphane Chazelas
Aug 16 at 13:13
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have to run a command every morning after I log on to the server to enable certain company specific functionalities.
The command looks like this:
source /data/dev/int/default/somethingsomething.env
Is there a way to automate this so I don't have to copy/paste it?
zsh environment-variables login source
I have to run a command every morning after I log on to the server to enable certain company specific functionalities.
The command looks like this:
source /data/dev/int/default/somethingsomething.env
Is there a way to automate this so I don't have to copy/paste it?
zsh environment-variables login source
zsh environment-variables login source
edited Aug 15 at 1:00
Jeff Schaller
32.6k849110
32.6k849110
asked Aug 14 at 23:21
solarflare
1093
1093
What shell do you use?
â Jeff Schaller
Aug 15 at 0:46
zsh apparently, had no idea how to even check this till now
â solarflare
Aug 15 at 0:50
@Wildcard, I didn't see a zsh answer in there, so I went ahead and posted an Answer here.
â Jeff Schaller
Aug 15 at 1:00
The "duplicate" was about sourcing a tcsh script when opening a terminal (that starts a bash shell on CentOS), quite different here. The answers there certainly don't apply here.
â Stéphane Chazelas
Aug 16 at 13:13
add a comment |Â
What shell do you use?
â Jeff Schaller
Aug 15 at 0:46
zsh apparently, had no idea how to even check this till now
â solarflare
Aug 15 at 0:50
@Wildcard, I didn't see a zsh answer in there, so I went ahead and posted an Answer here.
â Jeff Schaller
Aug 15 at 1:00
The "duplicate" was about sourcing a tcsh script when opening a terminal (that starts a bash shell on CentOS), quite different here. The answers there certainly don't apply here.
â Stéphane Chazelas
Aug 16 at 13:13
What shell do you use?
â Jeff Schaller
Aug 15 at 0:46
What shell do you use?
â Jeff Schaller
Aug 15 at 0:46
zsh apparently, had no idea how to even check this till now
â solarflare
Aug 15 at 0:50
zsh apparently, had no idea how to even check this till now
â solarflare
Aug 15 at 0:50
@Wildcard, I didn't see a zsh answer in there, so I went ahead and posted an Answer here.
â Jeff Schaller
Aug 15 at 1:00
@Wildcard, I didn't see a zsh answer in there, so I went ahead and posted an Answer here.
â Jeff Schaller
Aug 15 at 1:00
The "duplicate" was about sourcing a tcsh script when opening a terminal (that starts a bash shell on CentOS), quite different here. The answers there certainly don't apply here.
â Stéphane Chazelas
Aug 16 at 13:13
The "duplicate" was about sourcing a tcsh script when opening a terminal (that starts a bash shell on CentOS), quite different here. The answers there certainly don't apply here.
â Stéphane Chazelas
Aug 16 at 13:13
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Based on http://zsh.sourceforge.net/Doc/Release/Files.html#Files, I would recommend placing the command in your ~/.zshrc file.
Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc
Where ZDOTDIR can be set to override the default value of $HOME.
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
accepted
Based on http://zsh.sourceforge.net/Doc/Release/Files.html#Files, I would recommend placing the command in your ~/.zshrc file.
Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc
Where ZDOTDIR can be set to override the default value of $HOME.
add a comment |Â
up vote
1
down vote
accepted
Based on http://zsh.sourceforge.net/Doc/Release/Files.html#Files, I would recommend placing the command in your ~/.zshrc file.
Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc
Where ZDOTDIR can be set to override the default value of $HOME.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Based on http://zsh.sourceforge.net/Doc/Release/Files.html#Files, I would recommend placing the command in your ~/.zshrc file.
Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc
Where ZDOTDIR can be set to override the default value of $HOME.
Based on http://zsh.sourceforge.net/Doc/Release/Files.html#Files, I would recommend placing the command in your ~/.zshrc file.
Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc
Where ZDOTDIR can be set to override the default value of $HOME.
answered Aug 15 at 0:59
Jeff Schaller
32.6k849110
32.6k849110
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f462634%2fhow-to-automate-a-source-command%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What shell do you use?
â Jeff Schaller
Aug 15 at 0:46
zsh apparently, had no idea how to even check this till now
â solarflare
Aug 15 at 0:50
@Wildcard, I didn't see a zsh answer in there, so I went ahead and posted an Answer here.
â Jeff Schaller
Aug 15 at 1:00
The "duplicate" was about sourcing a tcsh script when opening a terminal (that starts a bash shell on CentOS), quite different here. The answers there certainly don't apply here.
â Stéphane Chazelas
Aug 16 at 13:13