There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot computer connection crash css dell drive driver drivers email error ethernet excel explorer firefox firefox 3 freeze hard drive internet internet explorer itunes laptop linux malware monitor network networking outlook outlook 2003 outlook express password printer problem problems ram router security slow software sound trojan usb virus vista windows windows xp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
Uninformed question


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
clenny's Avatar
Senior Member with 145 posts.
 
Join Date: Aug 2003
19-Nov-2006, 02:00 PM #1
Uninformed question
I never ask a dumb question. However, my uninformed questions sometimes reveal how little I know about a subject. Okay, now that we've established that, here is my question. When editing a sources.list list, what exactly does it mean to uncomment a line? Does that mean you add another # sign in front of the # sign already there? The reason I ask is trying to uncomment lines is what led to my many problems in the first place. I did some searches and such but didn't find a specific answer to that question. Thanks in advance.
__________________
The silence of the universe beckons us all.
prunejuice's Avatar
Senior Member with 1,550 posts.
 
Join Date: Apr 2002
19-Nov-2006, 03:10 PM #2
Quote:
Originally Posted by clenny
I never ask a dumb question. However, my uninformed questions sometimes reveal how little I know about a subject. Okay, now that we've established that, here is my question. When editing a sources.list list, what exactly does it mean to uncomment a line? Does that mean you add another # sign in front of the # sign already there? The reason I ask is trying to uncomment lines is what led to my many problems in the first place. I did some searches and such but didn't find a specific answer to that question. Thanks in advance.
If you add # before the source, that repository will not be used.
If you remove the # before the source, the repository link is active.

Basically, adding # before a line means "skip this".
lotuseclat79's Avatar
Distinguished Member with 10,521 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
19-Nov-2006, 05:44 PM #3
A '#' is a comment in shell script language at the front of the line or whereever it occurs in a line to the end of the line, so its no coincidence that it is used to mean that in lists. Same as non-operational, not active, skip this, etc.

To uncomment a line then means to do the following, given the following line:
# execute this

modify it to be:
# execute this
execute this

Note: I kept the original commented line for documentation to remember that a change has occured. You can also add a date/initials like:
# execute this uncommented by mjw on 11/19/2006
execute this

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction between a mere artisan or specialist and a real seeker after truth. - Einstein wrote in 1944.

Some say knowledge is power, I say knowledge without action is powerless. - lotuseclat79

Don't confuse action with movement. - Hemingway to Gardner

Imagination is more important than knowledge. - Einstein
Bartender's Avatar
Computer Specs
Senior Member with 197 posts.
 
Join Date: Apr 2006
Location: PNW, USA
Experience: Intermediate
20-Nov-2006, 08:18 AM #4
Yeah, but to get back to what clenny's asking, what's the difference between "#" and "##"? I've wondered about that too...
fenderfreek's Avatar
Computer Specs
Senior Member with 201 posts.
 
Join Date: Mar 2006
Location: Raleigh, NC
Experience: Advanced
20-Nov-2006, 04:11 PM #5
As far as I know, # and ## should do the same thing. The second '#' should be treated as part of the comment.
lotuseclat79's Avatar
Distinguished Member with 10,521 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
20-Nov-2006, 05:16 PM #6
To uncomment a line, take out the '#' at the beginning of the line. If there is another '#' following the first, as in "## ...rest of line", then the line is commented out by the remianing '#'.

-- Tom
clenny's Avatar
Senior Member with 145 posts.
 
Join Date: Aug 2003
20-Nov-2006, 10:14 PM #7
Quote:
Originally Posted by lotuseclat79
To uncomment a line, take out the '#' at the beginning of the line. If there is another '#' following the first, as in "## ...rest of line", then the line is commented out by the remianing '#'.

-- Tom
Okay, at the risk of dwelling on semantics, please explain what is meant by "commented out". Uncomment, I understand, that means to more or less activate a command that was inactive.. So I'm not sure I understand the difference between having 1 or 2 ## at the beginning of a line. It seems you are saying 2 #s are redundant. TIA
__________________
The silence of the universe beckons us all.
fenderfreek's Avatar
Computer Specs
Senior Member with 201 posts.
 
Join Date: Mar 2006
Location: Raleigh, NC
Experience: Advanced
20-Nov-2006, 11:43 PM #8
Having two ('##') would be redundant. Once it parses a '#' character, everything else on the line is ignored, including the second '#'. Different characters are used for comments in different things. Java, for example, uses '//' to denote a comment, and just one by itself won't do.
lotuseclat79's Avatar
Distinguished Member with 10,521 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
21-Nov-2006, 06:55 AM #9
Quote:
Originally Posted by clenny
Okay, at the risk of dwelling on semantics, please explain what is meant by "commented out". Uncomment, I understand, that means to more or less activate a command that was inactive.. So I'm not sure I understand the difference between having 1 or 2 ## at the beginning of a line. It seems you are saying 2 #s are redundant. TIA
What fenderfreek said.

The '#' works on a line basis until the end of the line is reached. If the first one is erased and is followed by another '#' later on in the line, everything up until the second '#' (i.e. when the first one is erase) is activated, and everthing after the second '#' is inactive due to being "commented out", i.e. by the second '#'.

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction between a mere artisan or specialist and a real seeker after truth. - Einstein wrote in 1944.

Some say knowledge is power, I say knowledge without action is powerless. - lotuseclat79

Don't confuse action with movement. - Hemingway to Gardner

Imagination is more important than knowledge. - Einstein
Bartender's Avatar
Computer Specs
Senior Member with 197 posts.
 
Join Date: Apr 2006
Location: PNW, USA
Experience: Intermediate
21-Nov-2006, 07:48 AM #10
clenny -
I'm still not sure I understand the # vs. ## thing. How about you?
All I need to know is whenever the OS scans a list for instructions, if it sees # at the beginning of a line it ignores that line and moves on. I don't think the computer cares if there's one # or a dozen of 'em.
fenderfreek's Avatar
Computer Specs
Senior Member with 201 posts.
 
Join Date: Mar 2006
Location: Raleigh, NC
Experience: Advanced
21-Nov-2006, 02:44 PM #11
Well, it does care...sort of. Let me try my hand at some examples

Assume the following is some entry that uses #'s to denote comments -
Code:
#This entire line will be ignored 
This will not be ignored # but this will
and
Code:
##This is ignored too.
If I change it to -
Code:
#This is ignored too
it treats it just the same.
Whether you use one or a million comment delineators, the first one is what starts the comment and the others are just pretty.
__________________
NCSU CSC Major
Registered Linux user #433004
  • Dell Vostro 1500 with Ubuntu 7.10
  • Intel Q6600 Quad Desktop running XP Pro
If this helped you, please take the time to rate the value of this post: http://rate.affero.net/fenderfreek/

Windows [n.] - A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition.
clenny's Avatar
Senior Member with 145 posts.
 
Join Date: Aug 2003
21-Nov-2006, 08:35 PM #12
Cool I think I get it
Thanks guys, I think I get it now. And I think I now know how I screwed up my sources.list list. I hope i don't have too many more screw ups while I'm learning Linux.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:21 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.