About 441,000 results
Open links in new tab
  1. bash - How do I add environment variables? - Ask Ubuntu

    Aug 27, 2011 · To set an environment variable from a script, use the export command in the script, and then source the script. If you execute the script it will not work. For an explanation …

  2. How to increment a variable in bash? - Ask Ubuntu

    Jan 30, 2017 · I found that on Bash 3.2.57, using declare -i x and then doing x+=1 in a loop (doing other thing), x did not increment more than one time. The let and (()) methods worked fine.

  3. What is the difference between #!/bin/sh and #!/bin/bash?

    May 25, 2012 · A script may specify #!/bin/bash on the first line, meaning that the script should always be run with bash, rather than another shell. /bin/sh is an executable representing the …

  4. BASH script to set environment variables not working

    Your command-line environment is the parent of the script's shell, so it does not see the variable assignment. You can use the . (or source) bash command to execute the script commands in …

  5. How to activate python virtualenv through shell script?

    Apr 30, 2020 · The same thing I am trying to achieve I have to run this command source .venv/bin/activate through a bash script which is not running, as I need the env should get …

  6. Linux Bash Script, Single Command But Multiple Lines?

    Linux Bash Script, Single Command But Multiple Lines? Ask Question Asked 13 years, 1 month ago Modified 2 years, 7 months ago

  7. Is bash scripting the same as shell scripting? - Ask Ubuntu

    Nov 30, 2014 · After man bash, some of the most important resources are Greg's wiki, Bash hackers and Steve Parker's recent book on Shell scripting that focuses mainly on Bash and is …

  8. When writing a bash script, how do I get the absolute path of the ...

    Mar 17, 2017 · When writing a bash script, how do I get the absolute path of the location of the current file? Ask Question Asked 8 years, 9 months ago Modified 6 years, 6 months ago

  9. bash - How can I create a select menu in a shell script ... - Ask …

    I'm creating a simple bash script and I want to create a select menu in it, like this: $./script echo "Choose your option:" 1) Option 1 2) Option 2 3) Option 3 4) Quit And according to u...

  10. bash - command does not work in script file, but works ok with …

    Sep 3, 2019 · I am running a command in my shell. It works ok in the shell. I mean just in terminal. But i need it to be run from a script file. When i run it from a script, the file specified in one …