LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What does this mean (https://www.linuxquestions.org/questions/linux-newbie-8/what-does-this-mean-583498/)

frankjg 09-09-2007 09:06 PM

What does this mean (Resolved)
 
I am new to Linux and know nothing about command strings.

I know what this string means, ethernet0.virtualDev = "e1000" but what does its format say. Especially what does the "." mean. Best yet what should I study to find out this for myself.

Thanks

Frank

taxtropel 09-09-2007 09:35 PM

Context
 
could you add some more context?
what were you doing? where did you find the string?
etc...

AwesomeMachine 09-10-2007 01:36 AM

"e1000" means that is a literal string value, or type "string". It means literally what it says. A hex value looks like this 0xb0a0123, and is not shown in quotes, ever. A string value is like this, "Hello", and means the word Hello.

Sepero 09-10-2007 05:39 AM

Looks like object oriented programming code.
"ethernet0" an object
"virtualDev" a variable that is inside the object
"e1000" the value the variable is set to

Like taxtropel said, we need more info.

jishengniao 09-10-2007 08:51 AM

What you have said is too little. We can not help you more!

frankjg 09-10-2007 09:30 AM

Quote:

Originally Posted by Sepero (Post 2887339)
Looks like object oriented programming code.
"ethernet0" an object
"virtualDev" a variable that is inside the object
"e1000" the value the variable is set to

Like taxtropel said, we need more info.

Thanks for the direction thats exactly what I was looking for. The only item left is what does the "." mean between ethernet0 and virtual device.

The string loads a different driver (e1000) then the default driver in a VM program I am learning.

Frank

synss 09-10-2007 10:37 AM

still lacking a bit on the context side ;)

"in a VM program I am learning" is it a top-secret thing? if not, maybe giving the name could help. Did you find this string in the source code? in the configuration file?

If it is code, then Sepero told you what it is, python example:
Code:

class C:
  def fun(self):
    print "me_fun"
  def another_fun(self):
    print "me_another"

'''create an object with properties from the class C'''
obj = C()
'''call the property fun in that object will print me_fun'''
obj.fun()

obj.fun() will return the string "me_fun"

(note, python is probably installed on your machine, at the prompt, enter 'python' without quotes, you can cut and paste the code above. It should work.)

If it is not code, then you should *really* say what it is...

tommytomthms5 09-10-2007 10:42 AM

are you trying to hack into tweak something???

Sepero 09-10-2007 10:51 AM

The dot means that variable "virtualDev" is inside of(belongs to) "ethernet0".

An object can have several variables inside of it. In a virtual machine program, you might have these statements like this:
computer.processor = "AMD"
computer.vcard = "nvidia"
computer.sound = "AC' 97"

frankjg 09-10-2007 08:50 PM

Quote:

Originally Posted by Sepero (Post 2887587)
The dot means that variable "virtualDev" is inside of(belongs to) "ethernet0".

An object can have several variables inside of it. In a virtual machine program, you might have these statements like this:
computer.processor = "AMD"
computer.vcard = "nvidia"
computer.sound = "AC' 97"

Sepero:

That is exactly what I was trying to understand.

The line I gave was from my config file in VMware setup for a Linux distro I am learning. Would the format of the strings be in a particular language like Python or C.

Thanks all

Frank

synss 09-11-2007 12:05 AM

It is a bit long, but you probably should have a look how to ask questions the smart way that would save your time as well. Like telling in the first post it is in a config to vmware so that people do not need to guess...

And to answer, config files are usually not written in a specific language (sometimes xml, sometimes source-able from the shell, or anything else) but they do not have to obey specific rules. Often, it associates values, like your e1000 to keys, like ethernet0.virtualDev. And this can be relatively arbitrary. However, config files are also designed by programmers, who tend to think every body knows how their favorite language works and may as well reproduce features of code into the config file.

If you want to change something, you should probably look for a tutorial on vmware config, look for a man page, or ask in the forum, very directly, what you want to do, a la: "I want to change the ethernet configuration from e1000 to blop300 in my vmware running a vista guest in an atari host, etc." with a sample (copy/paste) of the config file.

Enjoy!

frankjg 09-11-2007 09:35 AM

Quote:

Originally Posted by synss (Post 2888274)
It is a bit long, but you probably should have a look how to ask questions the smart way that would save your time as well. Like telling in the first post it is in a config to vmware so that people do not need to guess...

And to answer, config files are usually not written in a specific language (sometimes xml, sometimes source-able from the shell, or anything else) but they do not have to obey specific rules. Often, it associates values, like your e1000 to keys, like ethernet0.virtualDev. And this can be relatively arbitrary. However, config files are also designed by programmers, who tend to think every body knows how their favorite language works and may as well reproduce features of code into the config file.

If you want to change something, you should probably look for a tutorial on vmware config, look for a man page, or ask in the forum, very directly, what you want to do, a la: "I want to change the ethernet configuration from e1000 to blop300 in my vmware running a vista guest in an atari host, etc." with a sample (copy/paste) of the config file.

Enjoy!

Well, as in my orginal post I know what the string means and does. I was looking for the reason for the "." in the string. SEPERO gave me the answer that I needed to understand what the "." in a string signifies.

Thanks

Frank


All times are GMT -5. The time now is 04:29 AM.