The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


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 !!


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Variable for User Comment gseyforth Shell Programming and Scripting 2 03-09-2007 10:01 AM
how to comment multiple lines in unix balireddy_77 Shell Programming and Scripting 3 02-19-2007 03:16 AM
Comment faire une soustraction de date? Cecile UNIX for Dummies Questions & Answers 2 08-25-2006 06:38 AM
remove single-line comment Icy002 High Level Programming 3 04-09-2006 05:30 AM
Need to add a comment line in a text file orakhan Shell Programming and Scripting 2 09-22-2005 05:36 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-2004
Registered User
 

Join Date: Oct 2003
Location: Pratt,KS
Posts: 76
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
# 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 07:11 AM.
Forum Sponsor
  #2 (permalink)  
Old 01-07-2004
RTM's Avatar
RTM RTM is offline
Hog Hunter
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,206
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
Registered User
 

Join Date: Oct 2003
Location: Pratt,KS
Posts: 76
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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 08:14 AM.
  #5 (permalink)  
Old 01-07-2004
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,206
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
The 01 4 * * 2-6 line is failing because ends with 2.&1 instead of 2>&1
Google UNIX.COM
Closed Thread



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB 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 -7. The time now is 12:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102