LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-11-2006, 02:43 PM   #1
RGummi
Member
 
Registered: Nov 2005
Posts: 90

Rep: Reputation: 15
at - warning: commands will be executed using /bin/s


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
 
Old 10-12-2006, 07:32 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
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.
 
Old 10-12-2006, 12:01 PM   #3
RGummi
Member
 
Registered: Nov 2005
Posts: 90

Original Poster
Rep: Reputation: 15
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
 
Old 10-12-2006, 01:58 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,192

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Here's how I'd do it:
Code:
$ echo 'echo hello >/dev/null' | at now + 2 min >/dev/null 2>&1
This command creates the at job, silently.

Then come back later to investigate what you need:
Code:
$ at -l
$ at -c <jobnumber>
$ atrm <jobnumber>
The first command lists all your current at jobs (jobnumber and time of execution)
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
[/edit]

Last edited by haertig; 10-12-2006 at 02:01 PM.
 
Old 10-13-2006, 12:34 PM   #5
RGummi
Member
 
Registered: Nov 2005
Posts: 90

Original Poster
Rep: Reputation: 15
Hi,

thanks!

now I do the following:

echo $cmd | at $time $date 2>&1 | tail -n 1

this is perfect!

RGummi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048184 ravig Programming 5 11-01-2010 08:22 AM
Commands executed at boot time Johnburrell Linux From Scratch 3 09-18-2005 01:56 PM
/bin/... commands sources puishor Linux - General 2 06-23-2005 07:40 AM
Looking to run java commands outside bin/ nro Linux - Newbie 7 08-25-2004 02:40 AM
adding commands to /bin (root user) xone Linux - Software 4 03-23-2004 12:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration