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 6799015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:47:53+00:00 2026-05-26T18:47:53+00:00

I (on mac osx) often use export http_proxy=http://192.168.0.205:1099 to proxy http connection to get

  • 0

I (on mac osx) often use

export http_proxy=http://192.168.0.205:1099

to proxy http connection to get a highed download speed. To make things easy, I wrote a shell file named proxy.sh to do this:

#!/bin/sh
export http_proxy=http://192.168.0.205:1099

Before I downlaod, I execute proxy.sh shell command, but I found it did’t not come into effect.It lost http_proxy variable in current commnad window(terminal). I must type export command in current terminal,it will come into effect.

So I want to know what’s reason for this and a solution? thanks.

  • 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-05-26T18:47:54+00:00Added an answer on May 26, 2026 at 6:47 pm

    Running a shell script “normally” (with proxy.sh for example) results in that running in a sub-process so that it cannot affect the environment of the parent process.

    Using . or source will run the shell script in the context of the current shell, so it will be able to affect the environment, using one of the following:

    . proxy.sh
    source proxy.sh
    

    Another possibility (if you’re using bash at least) is to create an alias to do the work for you. You can use something like:

    alias faster='export http_proxy=http://192.168.0.205:1099'
    

    so that you can then simply type faster on the command line and it will export that variable (in the context of the current shell).

    You could also allow for one-shot settings such as:

    alias faster='http_proxy=http://192.168.0.205:1099'
    

    and then use:

    faster your_program
    

    which would translate into:

    http_proxy=http://192.168.0.205:1099 your_program
    

    That’s a bash way to set a variable for just the one invocation of a command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running Mac OSX 10.5.8. I installed matplotlib using macports. I get some
I am using GCC on Mac OSX. I am trying to get GCC to
I've installed Jenkins on my mac (osx lion). But I couldn't get it work.
After updating to Mac OSX Lion I find that I m unable to use
Mac OSX 10.6.4 Nexus One Android 2.2 The command adb devices will list my
In mac osx (cocoa), It is very easy to make a blank image of
I am new to Mac OSX, and I wonder if Xcode can generate ,
I'm running Mac OSX Snow Leopard, this problem is caused by a recent train
Are there any free Mac OSX IDEs for SQLite that you would recommend? I've
I am on MAC OSX. How to convert an gray scaled image to the

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.