 | Senior Member with 170 posts. | | | | 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. | | Senior Member with 1,785 posts. | | | | 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". | | Distinguished Member with 14,989 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 | | 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 1944
Imagination is more important than knowledge. - Einstein | | Senior Member with 197 posts. | | Join Date: Apr 2006 Location: PNW, USA Experience: Intermediate | | Yeah, but to get back to what clenny's asking, what's the difference between "#" and "##"? I've wondered about that too... | | Senior Member with 201 posts. | | Join Date: Mar 2006 Location: Raleigh, NC Experience: Advanced | | As far as I know, # and ## should do the same thing. The second '#' should be treated as part of the comment. | | Distinguished Member with 14,989 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 | | 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 | | Senior Member with 170 posts. | | | | 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. | | Senior Member with 201 posts. | | Join Date: Mar 2006 Location: Raleigh, NC Experience: Advanced | | 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. | | Distinguished Member with 14,989 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 | | 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 1944
Imagination is more important than knowledge. - Einstein | | 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. | | 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. | | Senior Member with 170 posts. | | |
21-Nov-2006, 08:35 PM
#12 | 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. |  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.
|
Smart Search
| Find your solution! | |
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 want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 08:41 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|