Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8272199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:03:32+00:00 2026-06-08T07:03:32+00:00

So I have an extremely simple shell script, where it inputs an IP address

  • 0

So I have an extremely simple shell script, where it inputs an IP address and a domain name in the hosts file of a person’s computer. For “development purposes only!” it works fine, it just inputs the IP address and domain name like so

192.168.53.215dev.env.os
192.168.53.215dev.source.os

Where I want it to input it like this:

192.168.53.215 dev.env.os
192.168.53.215 dev.source.os

So basically I want it to add space between the IP address and the domain name, unfortunately I can’t really figure it out. Any help would be appreciated, this is a simple script though and shouldn’t be cluttered with an over complicated script. Please keep it simple and explain exactly what you’re doing I would like to learn it not have it done for me thanks!

Here is the code:

do shell script "/usr/bin/printf \"\\n# Add #####'s ip for Sourcebox\\n192.168.53.215\\dev.env.os\\n192.168.53.215\\dev.source.os\\n\" >> /etc/hosts; /usr/bin/dscacheutil -flushcache" with administrator privileges
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:03:33+00:00Added an answer on June 8, 2026 at 7:03 am

    Using the -e flag with echo in a bash script will allow you to output tabs.

    echo -e "this\thas\ttabs"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an extremely simple BizTalk orchestration that takes a HIPAA 837 file in,
I have an extremely simple script with PHP exec , calling mysql command: $dbhost
I have an extremely simple page that I'm trying to view in the Facebook
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
I am currently learning F# and have tried (an extremely) simple example of FizzBuzz.
I have a SQL script which is extremely large (about 700 megabytes). I am
I have to remove duplicate strings from extremely big text file (100 Gb+) Since
I have an extremely simple IMultiValueConverter that simply OR's two values. In the example
I have this extremely simple splash page here: http://iph0wnz.com It has the main graphic
I have an extremely simple JSON object that looks like the following: var data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.