LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-24-2008, 07:11 AM   #1
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Rep: Reputation: 32
a gotcha with the at command?


A year ago I used the at command,and I seemed to manage OK.
But now I am a year older, so I think twice as slowly .. as a result, I can't get it to work. I'm sure there's a silly gotcha in there, something obvious, I'm not doing.

How far do I get at the moment? Well (say it's 17:00 hours) I just type "at 17:05" then <return>. I get a ">" quote and type the command "echo 'here I am'" and then <return> again. Then <ctrl>+d. Then "atq" to see if it's been recorded (it has). Then I wait ...

But nothin happens. After 17:05, I check atq, and the job has disappeared, but I have no record of it having been performed.

Any suggestions?
 
Old 12-24-2008, 07:54 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

The 'at' daemon spawns its own shell, then executes the command there, so you won't see the output. 'here I am' will have been echoed, but into the abyss instead of your terminal.

Try redirecting the echo command to a file, and see if the file appears at the specified time.

Dave
 
Old 12-24-2008, 09:41 AM   #3
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438

Original Poster
Blog Entries: 5

Rep: Reputation: 32
Quote:
The 'at' daemon spawns its own shell
ah, the light shines!
many thanks, ilikejam!

Is that maybe what the man pages means when it talks about at using /bin/sh ... I expect, it's implied by that.

happy christmas ilikejam, you've already given somebody a present! Appreciated!
 
Old 12-24-2008, 10:14 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ilikejam View Post
you won't see the output.
'at' mails any stdout and stderr to the user AFAIK.
 
Old 12-25-2008, 07:09 AM   #5
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438

Original Poster
Blog Entries: 5

Rep: Reputation: 32
Yes, they get mailed to you (type "mail" to see). And because it's both STDOUT and STDERR, yes, it can get very verbose.

The significance of spawning its own shell, is that all the aliases which one might have in one's .bashrc are unavailable.

You need to write out the full commmand or make a bash script out of it.

Another reason, if more were needed, for calling aliases a bad habit.

I still use them all the time though.

Last edited by stabu; 12-25-2008 at 07:10 AM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM
startx command in FC7 reverts me back to the command prompt sriram87 Linux - Newbie 5 01-03-2008 11:18 PM
SOLVED -- Hard-to-find gotcha in OpenVPN jlinkels Linux - Networking 0 07-30-2007 11:34 AM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:22 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
Open Source Consulting | Domain Registration