Date not updating in .alias
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have an alias file with the following line:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
In terminal, when I type "ss" it runs the command and saves correctly. However, if I run it again, the date does not update. Am I missing something?
terminal alias
New contributor
add a comment |Â
up vote
0
down vote
favorite
I have an alias file with the following line:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
In terminal, when I type "ss" it runs the command and saves correctly. However, if I run it again, the date does not update. Am I missing something?
terminal alias
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have an alias file with the following line:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
In terminal, when I type "ss" it runs the command and saves correctly. However, if I run it again, the date does not update. Am I missing something?
terminal alias
New contributor
I have an alias file with the following line:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
In terminal, when I type "ss" it runs the command and saves correctly. However, if I run it again, the date does not update. Am I missing something?
terminal alias
terminal alias
New contributor
New contributor
New contributor
asked 29 mins ago
soundsofpolaris
1012
1012
New contributor
New contributor
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
The problem is that the date
command is executed at the time you define the alias (not at the time of the first call to the alias. You must quote the $
:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
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
The problem is that the date
command is executed at the time you define the alias (not at the time of the first call to the alias. You must quote the $
:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
add a comment |Â
up vote
1
down vote
The problem is that the date
command is executed at the time you define the alias (not at the time of the first call to the alias. You must quote the $
:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The problem is that the date
command is executed at the time you define the alias (not at the time of the first call to the alias. You must quote the $
:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
The problem is that the date
command is executed at the time you define the alias (not at the time of the first call to the alias. You must quote the $
:
alias ss="import /home/User/Pictures/screenshots/screenshot-$( date '+%Y-%m-%d-%H-%M-%S.png' )"
answered 25 mins ago
RalfFriedl
4,6841725
4,6841725
add a comment |Â
add a comment |Â
soundsofpolaris is a new contributor. Be nice, and check out our Code of Conduct.
soundsofpolaris is a new contributor. Be nice, and check out our Code of Conduct.
soundsofpolaris is a new contributor. Be nice, and check out our Code of Conduct.
soundsofpolaris is a new contributor. Be nice, and check out our Code of Conduct.
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%2f480670%2fdate-not-updating-in-alias%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