logo
down
shadow

$BASH_VERSION reports old version of bash on macOS, is this a problem that should be fixed?


$BASH_VERSION reports old version of bash on macOS, is this a problem that should be fixed?

By : Elias Morris
Date : October 17 2020, 06:10 PM
To fix the issue you can do Your login shell (see echo $SHELL) is probably /bin/bash and that is the one setting $BASH_VERSION. If you need to use a specific version in scripts, use the full path in the #! line.
code :


Share : facebook icon twitter icon
Unable to modify /etc/shells on macOS to include brew installed version of bash

Unable to modify /etc/shells on macOS to include brew installed version of bash


By : Aleena Khan
Date : March 29 2020, 07:55 AM
it fixes the issue
An approach to adding to a root-only file is echo /usr/local/bin/bash | sudo tee -a /etc/shells. – Petesh
multiple ruby version on my macOS will auto switch version

multiple ruby version on my macOS will auto switch version


By : AdamP
Date : March 29 2020, 07:55 AM
I hope this helps you . Choose only one of them. You really can not have rbenv and rvm at same time. With rvm, it overrides the 'gem' command, so that would make rbenv useless.
Try this with rbenv:
code :
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
rbenv global 2.5.3
The requested version of macOS is not available. HOW TO FIX IT TUTORIAL. macOS Catalina public beta

The requested version of macOS is not available. HOW TO FIX IT TUTORIAL. macOS Catalina public beta


By : user3059757
Date : March 29 2020, 07:55 AM
To fix the issue you can do After wasting a day trying to install beta 05 - macOS Catalina, here is the workaround I came across.
Here's how to fix it:
code :
sudo /usr/sbin/softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.15beta-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
sudo rm /Users/Shared/.SeedEnrollment.plist
sudo nano /Users/Shared/.SeedEnrollment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SeedProgram</key>
<string>PublicSeed</string>
</dict>
</plist>
Non imported environment variable with shellshock fixed bash version

Non imported environment variable with shellshock fixed bash version


By : Mike Isman
Date : March 29 2020, 07:55 AM
Does that help I have a simple bash script which modifies a environment variable that will be used by subsequent binary. Bellow my basic script: , That's pretty ancient software you're using.
I suggest trying:
`test -s` for stdin is different on Ubuntu Bash 4.4 vs macOS bash 4.4, is there a portable alternative?

`test -s` for stdin is different on Ubuntu Bash 4.4 vs macOS bash 4.4, is there a portable alternative?


By : lee2rm
Date : March 29 2020, 07:55 AM
should help you out You can change your all stdin reading loop to this to make it work on both systems:
code :
[[ ! -t 0 ]] && while IFS= read -r A; do echo "-- $A --"; done
$> { echo one; echo two; } | ./test.sh
-- one --
-- two --

$> ./test.sh <<< $'abc\nfoo'
-- abc --
-- foo --

$> ./test.sh
$>
Related Posts Related Posts :
  • change date format from DD/MM/YYYY to YYYY-MM-DD with sed
  • kB to MB using awk
  • Using variables within a function (passing in a place holder)
  • Write a script (or a command)
  • -bash: emacs.profile: command not found
  • Using awk to get lines between two patterns
  • Is the term trap (of Bash) more accurate than the generic "callback" term in programming?
  • How to extract only specific string matching lines from a multiple lines standard input
  • Passing variables with spaces to function
  • Shell script read multiple inputs from user
  • How to pass multiple commands to a single command in bash using &&?
  • Bash Conditional Odd Behavior
  • Why should I add wait after done?
  • Script bash : Remove numbers from a file name between "-" and "_"
  • why the code inside EOF shows this error?
  • Why does a pipeline reading from and writing to the same file result in a blank file?
  • Unknown shorthand flag: 'd' in -d
  • Can a shebang refer to a remote program?
  • Why I am not getting a value when i call a function within another in a bash script
  • Why does ". myscript" return file-not-found in only one Git for Windows sh.exe?
  • How to parse a rdf format file from command line
  • Bash using cut to separate an IP and Port
  • sed an remove everything after the first pattern (only in the line)
  • echo is not entered into hash table
  • while read line not working on mac with makefile
  • How to redirect A's stdout to B's stdin and B's stdout to A's stdin?
  • Bash get the command that is piping into a script
  • How to group by one column and divide the numbers in second column depending from the third
  • move files that no not contain specific string
  • Translate git-log old commiter timestamp to strict ISO 8601 timestamp
  • How to write for loop to fetch data to newly created file?
  • mkdir no such file or directory syntax error?
  • How to run commands in parallel in bash?
  • How to get last sunday's date from today's date using shell script?
  • How to exec bash script w/o exiting shell
  • How to use an external variables file inside a script
  • How can I read a stream of key=value pairs in bash if the values can be empty?
  • syntax error near unexpected token `(' when defining function in bash profile
  • How to use awk and read together in bash script?
  • added wrong path to .bash_profile now I can not found any command
  • How can I pick every line of a file with a match and do operations with it?
  • How to print 02-Jun-2019 in bash
  • find all matches between two files then append character to beginning all matches in the second file
  • Google Cloud Storage - Create many copies of a single object/file quickly
  • Why does `export` fail on bad substitutions but not command failures?
  • I am trying to get a public IP from an instance I am just starting up
  • How to run a bash script, but skip the last 2 lines?
  • How to generate all ASCII characters with a brace expansion?
  • “How to fix ‘Syntax Error Near’ error in BASH”
  • Terminal not returning to normal after Bash Script
  • what code function will help to ask for input when i try to execute a code with no previous value in shell script
  • Replication and expansion of program flags in BASH script
  • Error on certain line: Syntax error: "(" unexpected
  • Find folders with a specific name and run bash commands on each location
  • scp error when defining a "PATH" variable in a bash script
  • Nested loop for reading two files with bash
  • Shell script: unexpected token ´if"
  • I want my script to echo "$1" into a file literally
  • pgrep -f cuts commands after 4095 characters
  • Escape double quotes in a Jenkins pipeline file's shell command
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk