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
Variable for User Comment gseyforth Shell Programming and Scripting 2 03-09-2007 02:01 PM
how to comment multiple lines in unix balireddy_77 Shell Programming and Scripting 3 02-19-2007 07:16 AM
Comment faire une soustraction de date? Cecile UNIX for Dummies Questions & Answers 2 08-25-2006 09:38 AM
remove single-line comment Icy002 High Level Programming 3 04-09-2006 08:30 AM
Need to add a comment line in a text file orakhan Shell Programming and Scripting 2 09-22-2005 08:36 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 01-07-2004
rocker40 rocker40 is offline
Registered User
  
 

Join Date: Oct 2003
Location: Pratt,KS
Posts: 78
# comment

Hi guys and Gals AIX 5.1
If I had a # above several scripts would it comment out everything below it?
Like this

#
01 2 ** .....................................
02 31 .........................................
# this is a script
03 12 **..........................


Would everything below that first comment be commented out?

Last edited by rocker40; 01-07-2004 at 11:11 AM..
  #2 (permalink)  
Old 01-07-2004
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Rocker40,

No, in shell scripting (sh, ksh, csh,...) placing one comment (#) does not comment all below it like <! does in html (where you have to 'turn it off' </! )

In some other languages it does work the same as in html - turn on comments and turn them off.
  #3 (permalink)  
Old 01-07-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
If you want to achieve that effect, you could use an "exit" statement.

I somethimes put code below a final exit statement while I'm developing a script.
  #4 (permalink)  
Old 01-07-2004
rocker40 rocker40 is offline
Registered User
  
 

Join Date: Oct 2003
Location: Pratt,KS
Posts: 78
comment

I am using AIX 5.1
I commented out a line and the took it out.
The only thing I noticed was that # sitting by itself so it had me wondering.
I guess I edited it with {VI} What language would these crons be written in using the AIX 5.1 ?
here is the actual script.
#
01 1 * * 6 /rd/bin/backup.full >> /rd/tmp/cron.full.log 2>&1
#refresh test enviroment from online backups
01 4 * * 2-6 /rd/bin/restoretest.db >> /rd/tmp/testdbrefresh.log 2>&1


It is the 01 4 * * 2-6 line that hasn't been running.
I just saw your reply
Maybe it is in the command script itself that the problem is?

Last edited by rocker40; 01-07-2004 at 12:14 PM..
  #5 (permalink)  
Old 01-07-2004
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,407
The 01 4 * * 2-6 line is failing because ends with 2.&1 instead of 2>&1
  #6 (permalink)  
Old 01-07-2004
rocker40 rocker40 is offline
Registered User
  
 

Join Date: Oct 2003
Location: Pratt,KS
Posts: 78
mistype

I am sorry I miss typed it it does go 2>&
  #7 (permalink)  
Old 01-07-2004
rocker40 rocker40 is offline
Registered User
  
 

Join Date: Oct 2003
Location: Pratt,KS
Posts: 78
resolution!!

It seems that maybe I forgot to run to run this command {crontab root} after using VI in when editing the root file of crontabs.
Some advice to my friends out there.
When ever you edit a root file usually located in /var/spool/cron/crontabs
you must run {crontab root} to activate the script back into action.
Fortunatly I was able to recover the data
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 05:01 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