http://www.linuxquestions.org/questions/linux-general-1/at-warning-commands-will-be-executed-using-bin-s-491520/
#1 | |
Member
Registered: Nov 2005
Posts: 90
Rep:
![]() |
at - warning: commands will be executed using /bin/s
[ Log in to get rid of this advertisement]
Hello,
is there a way to switch off the stupid output of at "warning: commands will be executed using /bin/s"? I have tried to send the stderr output to /dev/null, this works but the text with the job number is also send to /dev/null! So I'am looking for a switch to tell at that I dont'need this warning! Thanks R |
RGummi |
View Public Profile |
View LQ Blog |
View Bookmarks |
View Review Entries |
View HCL Entries |
Find More Posts by RGummi |
![]() | #2 |
Senior Member
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs
Posts: 4,820
Rep:
![]() |
Hi,
You need to tell at which shell to use (/bin/s is not a valid shell, you should look into this!) Use one of the following to tell at which shell to use (if present): -c C shell. csh(1) is used to execute the at-job. -k Korn shell. ksh(1) is used to execute the at-job. -s Bourne shell. sh(1) is used to execute the at-job. If you do not use one of the above the value of the SHELL variable will be used (which probably points to /bin/s, which is incorrect). man at for details. Hope this helps. |
druuna |
View Public Profile |
View LQ Blog |
View Bookmarks |
View Review Entries |
View HCL Entries |
Find More Posts by druuna |
![]() | #3 |
Member
Registered: Nov 2005
Posts: 90
Original Poster
Rep:
![]() |
Hi,
yes you are right! It says "warning: commands will be executed using /bin/sh" I have tried at -s but it says -s is an invalid option. man at does not say anything about -s, -c -k option. at -V says at version 3.1.8 R |
RGummi |
View Public Profile |
View LQ Blog |
View Bookmarks |
View Review Entries |
View HCL Entries |
Find More Posts by RGummi |
![]() | #4 |
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, Slackware, Slax, Knoppix, SysrescueCD
Posts: 1,328
Rep:
![]() |
Here's how I'd do it:
Code:
$ echo 'echo hello >/dev/null' | at now + 2 min >/dev/null 2>&1 Then come back later to investigate what you need:
Code:
$ at -l $ at -c <jobnumber> $ atrm <jobnumber> The second shows the details of a specific jobnumber The third deletes a specific jobnumber [edit] p.s. - If you want a one-liner that mimics what you are asking to do, here's one:
Code:
echo "echo hello > /dev/null" | at now + 2 min 2>/dev/null; at -l | tail -n1 Last edited by haertig; 10-12-2006 at 02:01 PM. |
haertig |
View Public Profile |
View LQ Blog |
View Bookmarks |
View Review Entries |
View HCL Entries |
Find More Posts by haertig |
![]() | #5 |
Member
Registered: Nov 2005
Posts: 90
Original Poster
Rep:
![]() |
Hi,
thanks! now I do the following: echo $cmd | at $time $date 2>&1 | tail -n 1 this is perfect! ![]() RGummi |