Ask Your Question

Can't use alias with "at" command !

asked 2017-11-22 08:36:32 -0500

arselan gravatar image

Hello everybody,

I am new in the world of Fedora, so i have a little problem. in my .bashrc file I defined an alias for the "halt -p" command:

alias bye='halt -p'

this alias is working perfectly in the terminal but when I try to use it with the "at" command..

$ sudo at now +5 min
[sudo] Mot de passe de Semah : 
warning: commands will be executed using /bin/sh
at> bye
at> <EOT>
job 35 at Wed Nov 22 15:27:00 2017

Nothing happens !!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-11-22 10:50:29 -0500

villykruse gravatar image

That is correct. You only have the currently exported environment variables available for executing by at.

You can run atq to get the job number, and then run at -c jobnumber where jobnumber is the value from the atq command. this will show you which variable and commands exactly is run when at is running the job.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-11-22 08:36:32 -0500

Seen: 50 times

Last updated: Nov 22 '17