If I understand your question correctly, you want to mount a network share from a Windows file server at the command line? The following article should probably help:
Hope this helps. I don't have access to any Windows systems here so I can't really test this out and check that it is still all valid for Mountain Lion.
Hi, indeed that URL and some others helped me.
The reason I want to work from the commandline is that I program in JAVA.
To overcome the language limitations I spawn bash commands or (directly) unix-commands from JAVA.
For some reason I failed to spawn this command:
/bin/bash -c /bin/mkdir /Volumes/XpShare; /sbin/mount_smbfs //guest@XPsystem/XpShare /Volumes/XpShare
so, for the time being I put it in a file and invoke "/bin/bash myScript.sh"
Btw, is this also THE way to connect to another Mac? (I ordered one) or should I use another protocol between Mac's?
I'm not really an expert on your second question, but I think the answer is "it depends". If you want to mount a share from another mac, I think it will depend on how you have exported the share. If you look in "Sharing" under "System Preferences" and then click "Options" you can choose whether you want to use SMB or AFP.
The following two articles may tell you more than you ever wanted to know about file sharing on OS X:
Hope that helps or someone else may chime in with more detail. Otherwise, give it a try when you get your second mac and start another thread if you are having problems.