Questions tagged [bash]
The Unix shell which was the default shell in macOS until 10.15
1,830 questions
0
votes
1
answer
46
views
Make bash regex range case-sensitive?
In bash (3.2.57) on MacOS 15.7.4, command line regular expressions are normally case sensitive, but when you list a range of characters, such as [a-z], the result is case insensitive. This is a ...
1
vote
1
answer
167
views
AppleScript Written on Intel iMac Runs Very Slow When MBA Exported As app on M2
Some years ago Apple dropped support for my ancient Canon Lide 30 scanner. So, I hung it off a Raspberry Pi (which still supports the scanner via scanimage) and wrote a very simple Apple Script and an ...
1
vote
1
answer
350
views
~/.ssh/rc is not executed when using ssh
I'm in the situation of having to connect to various systems via ssh to do some quick work and then leave without a trace. Before I do any work, however, I would like to set up some aliases to save ...
1
vote
1
answer
558
views
/etc/ppp/ip-up file is not being called upon VPN creation; Monterey
I'm trying to add certain subnets to my route table after launching an IKEv2 VPN tunnel from my Mac. I understand that this behaviour can be achieved by placing an executable ip-up file in /etc/ppp/ ...
53
votes
8
answers
53k
views
Why bash history on my mac won't save?
I have always used bash for work, and never had problems with it. Now, it does not save any command in history again.
If I open a window terminal, try some commands, it acts like everything has ...
2
votes
1
answer
99
views
Adding a reminder with keith/reminders-cli, upon passing its attributes with json?
I discovered https://github.com/keith/reminders-cli and found it supports also json.
How can I use it with jq to add a new entry with desired attribute? I tried the following
json_string=$(jq -n --arg ...
9
votes
0
answers
2k
views
Change keyboard layout automatically when external keyboard connected
I recently purchased an external keyboard (non-apple) that is used at home and also dragged along with me from time to time, and I've noticed a need.
My Mac is in English, as well as its physical ...
0
votes
1
answer
58
views
New Terminal tab at current folder
My login shell is zsh, the default in macOS Sequoia.
However, I'm used to bash and so my .zshrc simply does exec /bin/bash.
Pressing command-T in a Terminal window should open a new tab at the current ...
2
votes
1
answer
2k
views
Is it possible to close a script with a keypress?
In AutoHotKey, using the keyword "ExitApp" can allow the user to stop a script with a keypress. For example, Esc::ExitApp can stop a script by pressing "esc".
Now, with a ...
0
votes
2
answers
74
views
Is it possible to make this script "safe"? [closed]
#!/bin/bash
# Download Installomator
curl -fsSL https://raw.githubusercontent.com/Installomator/Installomator/main/Installomator.sh -o /usr/local/bin/Installomator
chmod +x /usr/local/bin/...
1
vote
2
answers
111
views
UI tests blocked by “bash requesting screen access” popup in Mac OS [closed]
On macOS, I get a system popup when running UI tests in GitHub saying:
“bash” is requesting to bypass the system private window picker and directly access your screen and audio.
How can I disable ...
131
votes
5
answers
361k
views
Getting all files from a web page using curl
I would like to get all files from the web page below using curl:
http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/
I tried:
curl http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/
It ...
6
votes
1
answer
4k
views
What the point of custom ANSI colors in Terminal Preferences?
In the preferences of the Terminal App, you can set custom ANSI colors for blue, green, yellow, bright red, etc. but they don't actually change anything in the Shell. For example using ls -G still ...
0
votes
0
answers
63
views
Piping bash history output to external command is extremely slow
I have moved to macbook pro from linux recently and I do have quite a big bash history (over 200000 commands).
Unfortunately while using bash history in macOS I have noticed that if I pipe history ...
5
votes
2
answers
3k
views
Last password change in macOS
Objective is to determine the last password change time for all the user accounts in macOS (Catalina).
sudo dscl . -read Users/swastibhushandeb accountPolicyData
Output:
<dict>
<key>...