Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 09-05-2006, 05:29 AM   #1
LQ Newbie
Registered: Aug 2003
Posts: 18

Rep: Reputation: 0
at Command Problem

I am having a problem running scripts using the at command on RHEL AS3. I need it to run in csh/tcsh, but it defaults to bash...unfortunately the Linux version installed does not have the luxury of the -c option to force C Shell to execute the at job, so I am at a bit of a loss.

I have a simple test script called b.ex:

set | grep -i shell
set text='SOME TEXT'
echo $text > test

that runs fine from the command line, and the file test is created with the expected text in:

1068-> b.ex
shell /bin/tcsh
1069-> more test

If run using "at -f b.ex now" the file test is created but empty, and I get the following output mailed to me:


If I create a script called containing just the following single line:


and then run "at -f now" then the b.ex scripts gets run and works fine.

Is there a workaround for this please, or is there a different version of the at command I can download and install...the trouble is, searching in google and on forums for "at" comes up with loads of matches.

Many thanks in advance.

Old 09-06-2006, 12:44 AM   #2
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389

It's too bad that the -c option is not present, but there is a workaround for your problem:

echo ./b.ex | at now should do the trick.

Hope this helps.
Old 09-06-2006, 05:23 AM   #3
LQ Newbie
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Thumbs up

Many thanks for taking the time to reply Druuna, and for the suggestion.

I can confirm that the method (echo filename | at now) you suggested does work, so I wrote a shell script called "newat" so that the users can use the same format they are used to (newat -f b.ex now + 1 hour) and it will use your echo method to pass the file b.ex to at and also pass it the time part.

Strange that something so simple doesn't work as you would expect though !?

Cheers again,



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
problem with dd command ? MaaSTaaR Linux - General 5 06-25-2006 07:50 AM
problem in cp command ksriram03 Linux - Newbie 2 03-15-2006 11:12 AM
Problem using rpm command thorney Linux - Newbie 1 11-24-2005 06:50 PM
command problem vickr1z Linux - Newbie 3 09-06-2004 12:43 PM
Problem with ls command URGENT pony85 Linux - Newbie 32 08-05-2004 02:53 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:35 AM.

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