+ Post New Thread
Results 1 to 8 of 8
Mac Thread, % hostname ... huh?? in Technical; Trying to follow the instructions at deploystudio - Verifying DNS Integrity and I'm falling at the first hurdle. If I ...
  1. #1
    theeldergeek
    Guest

    % hostname ... huh??

    Trying to follow the instructions at

    deploystudio - Verifying DNS Integrity

    and I'm falling at the first hurdle.

    If I put in

    Code:
     % hostname
    I get

    Code:
     -bash: fg: %: no such job
    My head hurts

  2. #2

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,771
    Thank Post
    1,511
    Thanked 1,294 Times in 884 Posts
    Rep Power
    813
    Ignore the "%"

    Code:
    hostname
    EDIT:
    just as a matter of interest, I see "%" before linux commands on a lot of websites, anybody know why this is used? I always presumed it was just to shorthand for terminal
    Last edited by LosOjos; 22nd February 2010 at 02:37 PM. Reason: Additional Info

  3. Thanks to LosOjos from:


  4. #3
    theeldergeek
    Guest
    Quote Originally Posted by JoshJohnson View Post
    Ignore the "%"

    Code:
    hostname



  5. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,053
    Thank Post
    3,585
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    377
    why have they got the % symbols in the instructions

  6. #5

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,771
    Thank Post
    1,511
    Thanked 1,294 Times in 884 Posts
    Rep Power
    813
    Quote Originally Posted by theeldergeek View Post


    Also, I can't see on my linux netbook what the result would be as I'm not connected to a server, but I think you need to run

    Code:
    hostname -f
    to get the FQDN

  7. #6
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,505
    Thank Post
    10
    Thanked 508 Times in 445 Posts
    Rep Power
    116
    Different shells have different prompts. It's like the > on windows command line.

    Understanding Shell Prompts - O'Reilly Media

  8. #7

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,053
    Thank Post
    3,585
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    377
    Quote Originally Posted by DMcCoy View Post
    Different shells have different prompts. It's like the > on windows command line.

    Understanding Shell Prompts - O'Reilly Media
    not to hi jack this thread but is there a good site that explains the difference between the shells and which is better to use or what they are better at etc etc

  9. #8
    AntonioRocco's Avatar
    Join Date
    Oct 2008
    Location
    South Yorkshire
    Posts
    270
    Thank Post
    11
    Thanked 114 Times in 95 Posts
    Rep Power
    41
    Hi

    @ macshinobi

    DMCoy is on the right lines. For a brief explanation and possibly some links:

    Shell Programming!

    If you want to learn Shell Scripting this is a good place to start:

    Advanced Bash-Scripting Guide

    I've not read it all (it's rather large) but I would not be surprised if the Tee-Cee and Korn shells are in there somewhere? Different shells have different strengths and are good at achieving certain things depending on what you want. The Bourne Again Shell (bash) which is predominantly used on OSX is a good all rounder but it's not the only shell available. For example keying in "tcsh" (minus quotes) in Terminal will put you in the Tee-Cee Shell. You know when you're in tcsh because the percent sign will follow the username. The bash shell uses the dollar sign. Keying "ksh" presents the dollar sign and nothing else. Keying "bash" gets you back again. To find out more from the command line itself simply launch Terminal and key in:

    man bash (for the Bourne Again Shell)
    man tcsh (for the Tee-Cee Shell)
    man ksh (for the Korn Shell)

    No doubt there are plenty of other shells/programming environments (the POSIX World is vast) which may or may not be available in OSX. Half the "fun" is discovering them for yourself. A fairly general rule of thumb is if there is a downloadable binary available you should be able to "make/compile" on OSX. Macports and fink are two examples. This would also be true of Linux. A good resource for UNIX on OSX is here:

    Apple - Support - Discussions - Unix

    Antonio Rocco (ACSA)
    Last edited by AntonioRocco; 22nd February 2010 at 07:55 PM.



SHARE:
+ Post New Thread

Similar Threads

  1. [Video] nope nope nope yip yip yip uh-huh uh-huh uh-huh [Sesame Street]
    By somabc in forum Jokes/Interweb Things
    Replies: 0
    Last Post: 19th September 2009, 07:27 PM
  2. Join Domain and Set Hostname
    By DanW in forum Scripts
    Replies: 1
    Last Post: 18th July 2009, 03:36 PM
  3. huh! that is the password!
    By IanT in forum Wireless Networks
    Replies: 3
    Last Post: 24th February 2009, 11:49 AM
  4. Blue skies huh
    By Butuz in forum Blue Skies
    Replies: 1
    Last Post: 1st November 2007, 03:05 PM
  5. Thin client hostname
    By edie209 in forum Thin Client and Virtual Machines
    Replies: 1
    Last Post: 12th January 2007, 10:21 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •