About 442,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 of the difference …

  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 system shell.

  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 the …

  5. command line - Bash script to rename files according to a list in a ...

    Dec 5, 2024 · Bash script to rename files according to a list in a file: How do I handle spaces? Ask Question Asked 1 year ago Modified 1 year ago

  6. 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 published by …

  7. 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 activated …

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

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

  9. linux - How to execute a bash script? - Super User

    $ bash myscript.sh hello world! Is this how I will always need to execute it? I feel like I have executed other scripts without having to precede it with bash. How can I run myscript.sh without having to …

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

    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 option of the