Find the answer to your Linux question:
Results 1 to 4 of 4
hi! I have some problems with a bash-script. e.g. I will find out my ip. I do it with a grep to ifconfig. but in relation to the systems language ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    3

    bash: change language for scirpt only



    hi!

    I have some problems with a bash-script. e.g. I will find out my ip. I do it with a grep to ifconfig.
    but in relation to the systems language my grep will fail because the text between the information differs from language to language (Adresse is german, address in english, .....)

    is it possible to change the language for a scipt ONLY that my grep will work on every machine??

    thanks!
    chris

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    Can you grep it from /etc/hosts file ?
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  3. #3
    Just Joined!
    Join Date
    Nov 2009
    Posts
    3
    Ah. thats not a bad idea.
    but there is no connecton to the nic (etcX) in the hosts file I think.
    I need to find the ip-address of a eth.

  4. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    I'm running out of ideas Just googled out this command
    getent hosts
    Let's hope some LF member can provide you exact details
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

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