New answers tagged

1

Homebrew needs your Mac password because installing most SW (including homebrew) requires permission from an admin user, which is given by you entering your password. Just enter the same password you use when you log into your Mac, and homebrew should get installed. Then, you can type brew install Macaulay2/tap/M2 to install it. UPDATE: According to https:/...


0

You can have files in the Dock, but they have to be the other side of the 'dividing line' from apps. So a shell script file, with suffix .command, or .tool, could be in the Dock and would launch on a click. There are other places to have scripts readily accessible in the Mac workspace, of course, such as the Scripts menulet.


0

Here's a slightly more succinct example of this in action: $ echo "PROMPT_RETURNED=$(osascript -e 'text returned of (display dialog "How many, eh?" default answer "") ') " PROMPT_RETURNED=6


0

Worth checking your Terminal preferences. From the keyboard, press the Command and comma keys [⌘ ,]. Then click on "Profiles" and select the "Shell" tab. Make sure the startup run command has the correct command. (Defaults to empty text.) Try unchecking the run command option and open another terminal tab. It should default to your system'...


1

From looking at the example in the documentation you need to specificy the full path to the commands you want to run /bin/cp $SOURCE_SELECTION_NAMES $TARGET_PATH /path/to/soffice --convert-to odt $SOURCE_SELECTION_NAMES


0

There are several histories for example bash and zsh. You can do this with nano. To do this, simply open the terminal With this you edit the bash history nano $HOME/.bash_history With this you edit the standard zsh history nano $HOME/.zsh_history If you want, you can do the whole thing using TextEdit. Bash: open -t $HOME/.bash_history Zsh: open -t $...


0

The new line helped - I got it using profilesToRemove () { profiles list | grep 'com.github.erikberglund' | awk '{print $NF}' } for i in $(profilesToRemove); do profiles remove -identifier "$i" done


2

You're not iterating through an array. $profilesToRemove is not an array, it's just some lines of text. ${(f)profilesToRemove} is very strange. Perhaps you meant $profilesToRemove? for needs to begin on a new line (or ; separated from the previous statement).


2

Jump Desktop will allow you to log in to the same computer you are using as a different user. You will have access to all of your files and apps. I have not done this extensively, but I did test it and it worked in Jump Desktop. The default macOS Screen Sharing.app will not do this. Screens 4 seemed like it was going to work, but it did not successfully ...


1

When you use the login command, you're switching accounts. You cannot then open the file in your current Finder/account if your current account doesn't have access. The analogous operation to doing login when interacting with Finder would be to fully switch over to that account. All running GUI programs are going to be using your current account. If you ...


0

According to the Smart Battery Data spec, the ManufactureDate is as follows: The date is packed in the following fashion: (year-1980) * 512 + month * 32 + day More specifically, when the integer is converted to binary: bits 0-4 -- day bits 5-8 -- month bits 9-15 -- years since 1980 Verifying this using my own machine, the integer derives to something ...


0

Just try type exit on the GNU GRUB. It fixed the issue for me.


7

I want to add that if you're security conscious, you should never cut-n-paste such a command from a web site to run on your computer like that. The HomeBrew project is a well-known and respected piece of software so I'm not saying that there is anything inherently wrong with installing it. However, their web site could be compromised in the future, where ...


12

/bin/bash executes a new instance of bash -c passes one or several commands to be executed $(...) runs the command within () and returns its result (Command Substitution) curl ... gets the file specified in the URL So basically bash gets called to execute the content of the file fetched by curl. Some things you may try to understand this in more detail run ...


0

For people using bash 5, you can install the homebrew package bash-completion@2 and add the following to your ~/.bash_profile. [[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh"


0

The following code in the .bashrc file should initialize an anaconda environment. Just remove them. # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/Users/proshore/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2$ if [ $? -eq 0 ]; then eval "$__conda_setup" else ...


0

You can also just add source .bash_profile at the bottom of your ~/.zshrc file


1

Is there a way to adapt the tutorial for use in zsh rather than Bash, No, not really. Customizing Zsh is fairly different from customizing Bash. It would be quite a lot of work. or is there a tutorial for customizing your zsh shell? Yes, there is! 🙂 There’s quite a few of them, in fact, but I found this one by far the best: https://scriptingosx.com/2019/...


0

I found this on Udemy's Linux Mastery course. history -r; history -w history -r removes the terminal history temporarily for the current session. history -w removes it permanently.


Top 50 recent answers are included