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
Crontab question blondie2407 HP-UX 12 09-16-2009 01:53 PM
Crontab Question. NycUnxer UNIX for Dummies Questions & Answers 9 11-14-2007 11:53 AM
CRONTAB Question pauls_579 UNIX for Dummies Questions & Answers 2 01-23-2007 05:46 PM
Crontab question ctcuser Shell Programming and Scripting 3 10-19-2006 09:22 AM
crontab question Relykk UNIX for Dummies Questions & Answers 7 03-28-2004 08:02 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-04-2005
steelrose
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
crontab question

Why does this cron entry do nothing? It works interactively.

58 23 * * * mydate=`date '+%Y%m%d'`;mv /opt/home/user/file /opt/home/user/file_$mydate
  #2 (permalink)  
Old 10-04-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
From the crontab man page:
Quote:
The sixth field of a line in a crontab file is a string that is executed by the shell at the specified times. A percent character in this field (unless escaped by \) is translated to a NEWLINE character.
  #3 (permalink)  
Old 10-04-2005
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Just a personal preference, I consider it bad coding to define a variable in the crontab...

On occasion the crontab can be hacked, especially on the user level, and code like that can be modified more easily than it probably could be in a file protected by directory permissions.
  #4 (permalink)  
Old 10-04-2005
sg6876 sg6876 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 3
Regarding Unix shell internal

Hi

I want to know how UNIX shell works internally. Basically want to know how the shell differentiates between a normal file (it can be shell script or any other file) and an executable file?

Thanks in advance
-sg
  #5 (permalink)  
Old 10-04-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Go to our faq section and read: What does "#! /usr/bin/ksh" mean?
  #6 (permalink)  
Old 10-05-2005
sg6876 sg6876 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 3
Thank you Perderabo my doubt got cleared.
Sponsored Links
Closed Thread

Bookmarks

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:47 PM.


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