LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-16-2015, 05:05 AM   #1
leniviy
Member
 
Registered: Jul 2009
Distribution: Archlinux
Posts: 69

Rep: Reputation: 4
`at` command: syntax error near unexpected token


Trying to learn `at` command. Want to schedule `date` to run instantly. Getting an email with strange error.

Have Rhel 6.6. Maybe it's bash-completion? Have version 1.3-7.

Code:
    $ echo date | at now
    $
    $
    You have new mail in /var/spool/mail/wasuser
    $ mail
    Heirloom Mail version 12.4 7/29/08.  Type ? for help.
    "/var/spool/mail/wasuser": 1 message 1 new
    >N  1 wasuser@ec-prod-app-  Wed Sep 16 12:53  16/686   "Output from your job        1"
    & 1
    Message  1:
    From wasuser@myhost  Wed Sep 16 12:53:14 2015
    Return-Path: <wasuser@myhost>
    X-Original-To: wasuser
    Delivered-To: wasuser@myhost
    Subject: Output from your job        1
    To: wasuser@myhost
    Date: Wed, 16 Sep 2015 12:53:14 +0300 (GMT-3)
    From: wasuser@myhost
    Status: R
    
    sh: line 44: syntax error near unexpected token `=\(\)\ {\ \ eval\ \`/usr/bin/modulecmd\ bash\ \$\*\`"
    "}'
    sh: line 44: `"}; export BASH_FUNC_module()'
    
    & d
 
Old 09-16-2015, 06:12 AM   #2
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by leniviy View Post
Trying to learn `at` command. Want to schedule `date` to run instantly. Getting an email with strange error.

Have Rhel 6.6. Maybe it's bash-completion? Have version 1.3-7.
Please post the whole script. Nobody (or at least I) can help you with that fragment.
 
Old 09-16-2015, 09:50 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
You've run into an incompatibility between 'at' jobs and the way the bash now exports functions (part of the "shellshock" patch). See https://bugzilla.redhat.com/show_bug.cgi?id=1147043.

If you update to RHEL 6.7, you will get at-3.1.10-48.el6, and the problem should be corrected.
 
1 members found this post helpful.
  


Reply



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
syntax error near unexpected token Fixit7 Puppy 1 05-13-2014 03:28 AM
syntax error near unexpected token `then' tuananhk53 Linux - Server 24 11-23-2013 03:14 AM
Syntax error near unexpected token ';;' Vashezz Programming 1 08-25-2012 07:45 AM
[SOLVED] Repeatedly getting command substitution: line 3: syntax error near unexpected token dontob Linux - General 8 08-31-2010 08:26 AM
syntax error near unexpected token `then' snakernetb Linux - Server 4 02-16-2010 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:45 PM.

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