LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-26-2011, 09:56 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 436

Rep: Reputation: 33
Meaing of the '$' in a command.


I have the following command which I think must be changed.

Is the $ a variable and should I change it to my names?

mydestination = $myhostname localhost.$mydomain localhost $mydomain

Should $myhostname be changed something like my host name such as

mydestination = $spacewalker localhost.$spacewalker localhost $spacewalker

If the $ is a variable should I leave it off?

Thanks
 
Old 08-26-2011, 10:29 PM   #2
bentbrewer
LQ Newbie
 
Registered: May 2011
Location: In a brewery
Distribution: Ubuntu 11.04 & 10.04, CentOS 6, Fedora 15
Posts: 20

Rep: Reputation: Disabled
It may be indicating a variable, but I think the entire word would be indicating a variable.

$myhostname = spacewalker
$mydomain = local

Unless you are on a domain...

Last edited by bentbrewer; 08-26-2011 at 10:35 PM. Reason: I'm an idiot.
 
Old 08-26-2011, 10:40 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by swamprat View Post
I have the following command which I think must be changed.

Is the $ a variable and should I change it to my names?

mydestination = $myhostname localhost.$mydomain localhost $mydomain

Should $myhostname be changed something like my host name such as

mydestination = $spacewalker localhost.$spacewalker localhost $spacewalker

If the $ is a variable should I leave it off?

Thanks

It would be nice if you gave people some context - where did
you dig these lines up? Is it code, is it a config file?
What is its purpose?


Cheers,
Tink
 
Old 08-27-2011, 12:43 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,252

Rep: Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685
I would also add that looking at the example so far there are no commands at all. What I see is a variable being set to a value, but as Tink says, for what
we have no idea without context.
 
Old 08-27-2011, 01:18 PM   #5
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 436

Original Poster
Rep: Reputation: 33
Sorry about that, I remember getting it from the main.cf file in Postfix
 
Old 08-27-2011, 06:03 PM   #6
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Rep: Reputation: 5
Yes, it is from the main.cf config file in Postfix. The file "... specifies a very small subset of all the parameters that control the operation of the Postfix mail system ..."

If you do a Google search for the entire string "mydestination = $myhostname localhost.$mydomain localhost $mydomain" then you'll see numerous Postfix-related sites which deal with it in one way or the other.

A good start would be at the following Postfix page:

www.postfix.org/BASIC_CONFIGURATION_README.html

Last edited by cheddarcheese; 08-28-2011 at 07:23 AM.
 
Old 08-28-2011, 05:38 AM   #7
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: OpenSUSE
Posts: 1,390
Blog Entries: 7

Rep: Reputation: 164Reputation: 164
Hello, i'm not entirely sure what you mean, but i'm just gonna throw this out there. if you're talking about the dollar sign after your users name, that just indicates you're signed as a user. as root it will no longer display a dollar sign but instead a hash, "#".
 
0 members found this post helpful.
Old 08-28-2011, 07:09 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by Knightron View Post
Hello, i'm not entirely sure what you mean, but i'm just gonna throw this out there. if you're talking about the dollar sign after your users name, that just indicates you're signed as a user. as root it will no longer display a dollar sign but instead a hash, "#".
Fist of all, that's clearly not what the OP is talking about, and second, very few shell prompts (I think thais is what you're talking about) I've seen consist of the username followed by a "$".
 
Old 08-28-2011, 05:40 PM   #9
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: OpenSUSE
Posts: 1,390
Blog Entries: 7

Rep: Reputation: 164Reputation: 164
hey calm down, if im talking about the wrong thing then the op can just ignore my post, no halm done. as for the shell, ive only used bash, so i'm not aware of how others display.
 
Old 08-28-2011, 06:07 PM   #10
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by Knightron View Post
as for the shell, ive only used bash, so i'm not aware of how others display.
bash can be made to use any prompt. AFAIK the default one looks like this:

Code:
bash-X.X$
, where "X.X" is the version number. But most distros make it like this by default:

Code:
username@hostname:current-dir$
.
 
Old 08-30-2011, 03:07 PM   #11
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 436

Original Poster
Rep: Reputation: 33
mydestination = $myhostname localhost.$mydomain localhost $mydomain

So, I'm really sorry but a simple straight for answer would really help and I know you all have been trying:

Do for the example above is the $myhostname variable change to my name such as $spacewalker???

BTW, I'm on the U.S. East Coast and couldn't answer before because of electrice outages.
 
Old 08-30-2011, 03:32 PM   #12
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Rep: Reputation: 5
I really think you'd find more help at a site dealing with Postfix issues, such as the one I suggested a day or two back. It is a Postfix file, and you're asking about Postfix configuration.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 12:21 PM
how to copy drive using dd and tee command parallely? source code of dd command mdfakkeer Linux - Software 1 02-10-2010 02:31 PM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 03:14 AM
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 08:19 PM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 07:30 PM


All times are GMT -5. The time now is 06:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration