The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

6
votes
0answers
292 views

Issues with Unicode symbols in some applications running in Terminal.app and iTerm2

Darwin DeoGloria 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Fresh user account. Terminal.app and iTerm2 with UTF-8 set. Accented ...
4
votes
0answers
60 views

Terminal prompt 'saving' certain commands on up-arrow

I added a little bit of shell scripting to my prompt for fun. It alternates the colors of prompt items randomly. I did it purely because a gray screen gets boring after awhile. The following is my ...
2
votes
0answers
30 views

Bash Ctrl-A Returns to Start of Line but Doesn't Display Properly

When I ssh into a Linux server from bash Terminal, I can use CTRL+A to return to the start of line properly, and CTRL+E to go to end of line and everything works fine. When I use bash locally on my ...
2
votes
0answers
38 views

Set up a Mac to run OSX (None Browser) application in pure kiosk mode

I've been trying for a number of months, using many methods, to run a Nuiteq Application called Snowflake on our 10 Mac Minis attached to touch-screens in pure Kiosk mode. I'm using Yosemite. These ...
2
votes
0answers
36 views

Using CTRL with bash

Coming from year on Windows, I swapped Cmd and Ctrl buttons. On bash I used to press Ctrl+A/Ctrl+E for jumping to the beginning/end of line. But, since I swapped the buttons I need press Cmd+A/Cmd+E. ...
2
votes
0answers
42 views

Grant rights on a certificate to an app through the shell

I'm currently looking for a way to grant an application rights to a certificate in my /Library/Keychains/System.keychain through the shell. I can currently do this through the Keychain Access App by ...
2
votes
0answers
80 views

Terminal hangs when title includes unreachable NFS path

[Edit: reframing to make the question more clear] I use the Mac Terminal to access remote linux systems. On the Mac, the bash prompt is set by: PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}\...
2
votes
0answers
42 views

Terminal: disable printing/output of keyboard commands

I have the same problem as this person – I am running a C script and somehow when I pass the EOF signal with Ctrl+D, ^D gets printed to the console. My question is therefore: is it possible to ...
2
votes
0answers
36 views

Is there a way to run a bash script everytime I print something?

I wanted to run a script that changes my background image whenever use the printer. Is it possible? Is there a way to know when OS X is printing something?
2
votes
0answers
475 views

Set file metadata attribute values

I'm trying to set the values of some file metadata attributes in OS X Yosemite - kMDItemDateAdded and kMDItemLastUsedDate - the values of which can be shown using mdls <filename>. I'm trying to ...
2
votes
0answers
57 views

Determine when an application last launched

I need to have a script return a date that a particular application launched (in this case Parallels, but solution should be non-specific) so that our asset management system can mark the license for ...
2
votes
0answers
267 views

How to use nohup/send process to background on os/x

The command nohup <command> & does not actually work properly on mac it seems: the process is suspended. Issuing fg appears to be required to reactivate the command. Here is an ...
2
votes
0answers
392 views

How to make files safe so users can download and OS will not quarantine them?

I work with Axure software that generates dynamic and navigable prototypes in HTML. Once they are done I need to send a ZIP file of those HTML files to clients via e-mail or any download internal ...
2
votes
0answers
322 views

bash autocompletion scripts in OS X

Here is what I learned so far: # settings on mac if [[ $(uname) == "Darwin" ]]; then # enable bash completion if [ -f `brew --prefix`/etc/bash_completion ]; then . `brew --prefix`/...
1
vote
0answers
18 views

Open Directory local admin users

Is there a bash command to add an Open Directory admin group to the local admin group on a Mac with 10.10? I'm trying to remove all local admin accounts but still be able to control them with Apple ...
1
vote
0answers
286 views

OS X El Capitan bash shell not working in Terminal

I have a weird issue with my bash shell in OS X El Capitan. I was messing around with my .bashrc file today, and now when I open my terminal I see nothing out of the ordinary (no messages, just the ...
1
vote
0answers
40 views

trim Mac files to move to Windows

I have a large number of Mac files that I need to remove illegal characters that Windows will not like and to shorten the file names while preserving the extension. I have found a Bash script that ...
1
vote
0answers
33 views

Getting bash-3.2 everytime I “su”

Whenever I su, PS1 changes to \s-\v\$. Why is that? Tried setting it, but it still changes when I su again, or exit the terminal. What to do?
1
vote
0answers
55 views

Chrome desktop apps (extensions) won't launch at startup on OS X

I'm trying to figure out how to get a chrome desktop app (Kiosk) to launch at startup. I've gone to System Preferences > Accounts > Login items and added Kiosk (User > Applications > Chrome Apps > ...
1
vote
0answers
28 views

“terminal-notifier.app is not open anymore”

From a .plist loaded to Launchd I run a bash script which displays a notification using terminal-notifier. The notification is displayed fine, but when clicked the message "terminal-notifier.app is ...
1
vote
0answers
21 views

Automating VPN switching

I can us a VPN app like tunnelbear to appear to be in other countries, but is there a way to do this in a bash script or applescript? I want to be able to run automated tests on my iOS apps (in the ...
1
vote
0answers
25 views

Odd issue with iTerm2 (built from Git repo)

I'm currently using iTerm2 version 3, built from the GitHub repo. My default shell is bash, but I have iTerm set up in a way to default to using zsh on startup. I had this set so that the default ...
1
vote
0answers
68 views

Adding a directory to $PATH doesn't work in Yosemite

I've tried to do it both ways: 1. I edited ~/.bash_profile like so: $ cat ~/.bash_profile export PATH="${PATH};~/bin" $ $ ls -l ~/.bash_profile -rw-r--r-- 1 myuser staff 202 Oct 1 16:57 /Users/...
1
vote
0answers
171 views

Mac Terminal (+bash +tmux +set-o vi) missing characters at end of line

Often when editing a historical bash command in vi mode (after pressing ↑), and then moving backwards in the text using b. When I begin editing the text after pressing i or a, the extra text I insert ...
1
vote
0answers
32 views

In bash script, how to have a script that runs in the background and starts when an application is opened

I'm making a script which should run when I open Safari. I want it to open when the user logs in and run in the background, then have part of the script to run when Safari opens. Is this possible in ...
1
vote
0answers
149 views

How to set the colour of a folder with a specific name on mac terminal?

I am using these four lines in my .bash_profile file to enable colouring on my mac terminal (Mac OS Yosemite). export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " ...
1
vote
0answers
84 views

Creating Smart Folders (perhaps programmatically) based on photo IPTC metadata?

I have thousands of photos with IPTC metadata -- I'm mostly interested in the star-ratings and the tags -- and I'd like to create folders for those images that automatically stay in sync as I change ...
1
vote
0answers
149 views

Bash script to import RootCA and set it to Always Trust from Server

I am working on a way to import a RootCA into the login keychain of OS X and set it to always trust, the cert is located on a file share server. I am relatively new to the whole Bash scripting scene ...
1
vote
0answers
311 views

Problems with a simple shell script

I've faced with the problem of using simple shell commands like AWK and print within my sh scripts on my Mac ( the same script works perfect on the Linux). For instance below script which seek for the ...
1
vote
0answers
23 views

Window UI Texture Artifacts

I just install OSX Lion on an old Mac Pro, as well as all the major updates 10.7.1 through to 10.7.5. Then I installed the BASH Shellshock patch for OSX Lion 10.7.5 and after restarting my Window UI ...
1
vote
0answers
68 views

Is HISTFILESIZE behavior different in Yosemite?

For a long time I've used the HISTFILESIZE environmental variable to control the number of lines that get written to my terminal history (the default of 500 is not enough; I set it to 10000). Ever ...
1
vote
0answers
163 views

dtruss -f is not following children processes?

Following is not following the child "sql.py" python process: sudo dtruss -f run-test sql.py 2>&1 Here is the output - which shows no evidence of following the invoked python: PID/THRD ...
1
vote
0answers
123 views

Running “irb” changes my zsh to bash on iTerm2

I'm running OSX 10.9.4, and my default shell is set to z shell. I was just working out my installation of Ruby and RVM and playing around with irb when I suddenly notice that my window title says "...
1
vote
0answers
283 views

PROMPT_COMMAND='history -a; history -n' changed (broken) in Yosemite / bash 3.2.53

I need my command history to be shared across all terminal sessions and all commands available for immediate recall from any other terminal. This is the default for old school ksh shells but hasn't ...
1
vote
0answers
74 views

How to fix Bash on an older MacOS

I am still running MacOS 10.6.8 on my older iMac because of software issues-some of my most useful stuff won't run on systems past Tiger. Can I use the patch published by Justin Meyers in "Every Mac ...
1
vote
0answers
184 views

Detecting that an external display is plugged in or unplugged on a laptop via bash

Is there a way via bash to detect that an external display has been plugged in or unplugged via bash? I know that I can create a crontab command that fires a script that uses the system_profiler ...
1
vote
0answers
84 views

What's the /home directory for, or did I just accidentally create it?

I saw reference to a bash command, cd /home, in a multiple choice quiz about navigating within Terminal. I tried it, expecting -bash: cd: /home: No such file or directory, but to my surprise it took ...
1
vote
0answers
44 views

Why nc doesn't response even if the “w” option set?

For some servers: nc -w 1 -z x.x.x.x 22 doesn't work. It has no response, but is looking like very busy: only ctrl + C can help. So -w 1 seems to be a useless option, to specify the timeout. Does ...
1
vote
0answers
110 views

Most efficient way to get all files in a directory

I have a million+ files spread across four fiber-connected arrays. I need to get the path, filesize, and last_modified date to insert into a mysql database. What would be the best way to do this? ...
1
vote
0answers
4k views

using -exec command on mac os x

Does any know why the -exec does not work on mac os x lion terminal? It works on linux and other variants but not on mac os x find / -iname "*.mp3" -exec mv {} /mnt/mp3 \;
0
votes
0answers
32 views

echo command works fine at terminal but not from shell script

#!/bin/bash # the echo command below work fine when copy pasted into terminal # but behaves differently when run from sh script echo "starting and running from script file" echo ">...
0
votes
0answers
16 views

How to scan all available sound output devices on Mac?

I have an early 2015 Macbook Pro and Raspberry Pi which is running Airplay player. However, my Macbook usually won't recognise Airplay player as sound output when Raspberry Pi is turned on. It does ...
0
votes
0answers
11 views

Is there a way to display an instance of BezelUI (brightness HUD, volume HUD) using BASH or AppleScript?

Long story short, I've written a simple BASH script to control the brightness of a non-Apple external monitor using ddcctl. It works, with a couple hacks. It would be really cool if I could display a ...
0
votes
0answers
7 views

Git Pull/Push not working with git-completion

I'm currently having an issue with git-completion when it comes to my own aliases set up. I have my .bash_profile set up like so (stripped some to not show other info): alias checkout='git checkout' ...
0
votes
0answers
14 views

brew upgrade breaks terminal, requiring reset

When I run brew upgrade in my Bash shell, it breaks the terminal display (in both iTerm2 and Terminal) such that I can't see anything I type in the following prompt and I can't see the history. For ...
0
votes
0answers
16 views

Warning when starting script with osascript within script

scriptName.sh contains the following code. osascript <<EOD (display dialog "To: $name $number \n $sentence" ¬ with title "Message" ¬ buttons {"Send", "ReDo", "...
0
votes
0answers
24 views

Session restoration in terminal has stopped working

Running 10.11.5 From the time I installed El Captain I have enjoyed having the individual bash histories restored with my sessions (along with the window contents which has been the default for some ...
0
votes
0answers
14 views

Running “npm init” in bash, can't see input or output

My bash shell is acting weird suddenly. When I run "npm init", the questions are are hidden by funky characters, and when I type in my answers, they're hidden too. It happens in both Terminal and ...
0
votes
0answers
26 views

Possible to force command line to be somewhere else than bottom of the screen?

In my vimrc, I have the following line: let so=999 to force the cursor to stay in the middle of the screen, which is something I find more comfortable. However, when going back to the terminal, ...
0
votes
0answers
22 views

qlmanage (quicklook) crashes on file update

So has a possible bug and I want to know if others can reproduce it or if it's unique to my system. If you open a file with qlmanage -p foo.gif &> /dev/null & a debug mode of quicklook ...