The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unexpected crontab error dhanamurthy Shell Programming and Scripting 12 11-06-2008 10:24 PM
crontab -e error uadm26 Linux 5 01-03-2008 12:53 PM
Run perl file in Crontab error. raccsdl Shell Programming and Scripting 2 11-13-2007 07:07 AM
Crontab error Cannot execute binary file. raccsdl Shell Programming and Scripting 5 11-13-2007 06:22 AM
crontab: error on previous line; number out of bounds. oradbus UNIX for Advanced & Expert Users 1 07-01-2005 04:21 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-07-2008
kclerks11 kclerks11 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 7
Crontab error

So I'm trying to set up a simple cron job to copy the contents of a folder to my local machine. When it's ran the following output is produced:

sh: syntax error at line 1: `(' unexpected

Here's line 1:
scp -r user@host:/cygdrive/c/logfolder1/ /log_files/$(date +%m_%d_%Y)
  #2 (permalink)  
Old 12-07-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 427
what is the output of this command?

Code:
echo /log_files/$(date +%m_%d_%Y)
  #3 (permalink)  
Old 12-07-2008
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,209
The traditional bourne shell does not allow $() syntax, backticks must be used.
Closed Thread

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0