The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
8 views

Install automator service via command line

I would like to automate my Mac installation flow for services. The following is my script: #!/bin/sh rm -rf ./tempWorkflows mkdir tempWorkflows for filename in ./*.workflow; do cp -R "$filename" ...
2
votes
1answer
28 views

is a directory error in bash script

I have very limited knowledge of bash scripting, and I haven't been able to figure out what I'm doing wrong. So I apologize if there's an extremely simple solution that I've overlooked. I'm trying to ...
2
votes
1answer
32 views

How to differentiate between Terminal scripted launch and manual launch for .bash_profile settings

I have some .bash_profile settings that restore my last working directory every time I log in to my shell. However, I also use a program that opens a terminal window in the current directory open in ...
0
votes
1answer
27 views

How do I reload an OS X “bash” user-environment

I think that I want to ask How do I reload an OS X bash user-environment But damnit Jim ; I'm a software engineer not a sysadmin The Goal I want Jenkins started as a Daemon on El Capitan I want ...
0
votes
1answer
12 views

How to configure a proxy in a new network location using Terminal.app

I'm writing a bash script, which will create new network location and configure it. The question is - how to add proxy settings to specific network location using terminal or bash script? P.S. I'm ...
1
vote
3answers
34 views

Missing bash prompt

My bash prompt is missing as shown on the image. I'm not even sure how to open the .bash_profile since dot files are hidden in the finder. I restarted the machine to no avail.
0
votes
2answers
61 views

terminal: how do i pipe the results of grep to open a file

I'd like to grep and open a file in just one terminal command. Suppose I'm in this directory: $ ls 1.txt 2.txt 3.txt 4.txt 5.txt and I want to open 3.txt I thought I could do ls | grep 3 ...
0
votes
1answer
30 views

Path not being honored?

I have the following in my .bash_profile: $ cat ~/.bash_profile # Prompt export PS1="\h:\W$ " # Standard path export PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin: ...
0
votes
0answers
23 views

Terminal: “Invalid Argument: dirname” (El Capitan)

I noticed the issue when I first went to run defaults write com.apple.finder AppleShowAllFiles YES in OS X Terminal (10.11.2) but this was returned bash: /usr/bin/defaults: Invalid argument I'm ...
0
votes
1answer
8 views

How to trigger a bash script from right click in Safari on a particular URL?

is it possible when I'm in Safari and have link (URL) to trigger a bach script with an right mouse option? The bach script should be run with this format: bash scriptname.sh -parameter -parameter ...
2
votes
2answers
144 views

Cannot kill process shown in parenthesis

I started a rather long dd command that I would like to stop. ps shows: $ ps PID TTY TIME CMD 2006 ttys002 0:00.00 (dd) The dd process is shown in parenthesis without the argument. ...
1
vote
0answers
23 views

OS X (El Capitan) Terminal Fn-Up and Fn-Down stop working as Page Up and Page Down

I've identified a strange "state" my Terminal program seems to get into. It doesn't happen on all tabs -- right now, one tap can Page Up/Down properly, and another one can't. When I open a new ...
0
votes
1answer
28 views

sudo and some other system commands not working with platypus

I am making a shell script that works great on its own, but does not work correctly when packaged with Platypus. It does not want to execute sudo, and a few other system commands. Are there any work ...
0
votes
1answer
37 views

How does bash choose default shell

I am running El Capitan 10.11.3 with bash version 3.x so I decided to update bash via: brew install bash Brew places the new bash under /usr/local/Cellar/bash: brew info bash bash: stable 4.3.42 ...
0
votes
0answers
27 views

Uninstall old CMake and its implications

Currently I'm setting up a user account on a Mac Mini that's been used before by others. I found a pretty old version of CMake installed in /usr/local/bin - a pretty default installation path. I ...
0
votes
1answer
21 views

Help running what seems to be a directory in Terminal?

I'm trying to export my Skype chat history with this: https://github.com/Temptin/SkypeExport After I'm in the downloads directory in Terminal, typing in (with my skype username substituted in) ...
0
votes
1answer
30 views

Making Terminal bash auto-complete stop at ambiguous character and display all possible options

The behavior I see happening is that when I type something partially and hit TAB, if there are multiple files/commands that match what I had typed in, only the first one is displayed. Further TAB hits ...
0
votes
2answers
16 views

Listing/Moving certain files

My current path is /Users/UserName/Downloads/Downloaded_Path. In Downloaded_Path Folder i have multiple folders like F1, F2 etc and each folder contain rar part-files from rar to r99. What I want to ...
0
votes
0answers
19 views

Schedule executing tasks based on bash scripts using CronniX

I'm still quite new you Mac and OS X but do have some background about other UNIX based systems, so please excuse for any misunderstandings. My goal is to implement a function that executes certain ...
0
votes
1answer
24 views

How to get local directory names into terminal window titles?

The title of my terminal window is: Terminal -- bash -- 130x39 This is how I see them listed in Terminal->Window and it is very hard to know which one is which. When I use multiple terminals, the ...
0
votes
2answers
56 views

Issue with Automator and bash script

I'm making an automator service, and the first part takes files and RARs them using a bash script So in Automator, I have a Get Specified Finder Items action to test the workflow, and then the bash ...
0
votes
0answers
20 views

Saving space by hard-linking duplicates

I am looking for tool, script etc to hard link (or something equivalent) files with the purpose of saving space. (Going through files, finding duplicates and hard-linking them in). Will also then ...
0
votes
0answers
33 views

Is there a command or script in mac OS X to set the creation date to match the modification date?

Somehow, the creation date of all the photos on my USB drive has been updated to a recent date, but the modification date remains untouched. So any photo app thinks the photos were just taken recently ...
2
votes
1answer
66 views

Is it possible to open a Private Browser window in Safari using Terminal.app?

I'm trying to open a Private Browser window in Safari using Terminal. I could open Safari using open command and this way, open /Applications/Safari.app/Contents/MacOS/Safari but I couldn't open a ...
2
votes
2answers
59 views

Why I am unable to switch bash to the one installed by homebrew?

I'm trying to update bash to version 4.x. I did brew upgrade, then brew update, then brew install bash. I ran sudo bash -c "echo /usr/local/bin/bash >> /etc/shells" and sudo bash -c "echo ...
1
vote
0answers
27 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?
0
votes
1answer
57 views

Is $PATH just a file with a list (in order of preference) of directories?

I'm having trouble understanding exactly how $PATH works? I am on a Mac.. If I install Python with Homebrew, it will install Python into the /opt/local/bin directory. Now assuming Homebrew didn't ...
3
votes
2answers
190 views

I deleted .bash_history, now history isn't saved anymore (although I re-created it)

I have freshly installed a new copy of El Capitan. I accidently deleted .bash_history, so I just did a touch .bash_history again, hoping this would solve the problem of my bash history not being ...
0
votes
1answer
59 views

OS X El Capitan: man, command not found

Today I was trying to update openssl in my MacBook Pro with El Capitan 10.11.2. I don't know where I made a mistake but it seems I have accidentally disabled man. In fact, if I launch man ...
1
vote
0answers
23 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
1answer
23 views

Where is my .bashrc file in a dd image?

I created an "emergency" image of my entire HD using the procedure explained in Recover a dead hard drive using dd. I spent a lot of time fine tuning my .bashrc and .profile files, but I cannot find ...
0
votes
1answer
13 views

How can I hook up a PHP server?

I have a php page I want to test on a server. Is there a server that runs through Terminal.app that supports PHP? I read this tutorial, but either I did it wrong or it didn't work. How can I start up ...
0
votes
2answers
57 views

How to Poll USB mouse through terminal in El Capitan

I've been trying to view which devices are connected to my USB ports through terminal in El Capitan, in particular a USB mouse. I've read online that I can ls /dev/tty.* to view all connected devices. ...
2
votes
2answers
36 views

Bash history is not remembered in Terminal

My Bash history is remembered when I connect to my Mac via SSH, use iTerm2 or launch bash in the built-in Terminal app (every command I typed in bash is saved) but is not when I just use the built-in ...
0
votes
3answers
11 views

Retrieving the “Version” attribute of an OSX Application file via Bash

I was initially attempting to do this in Java using the UserDefinedFileAttributeView class but it turns out that is only available on Windows computers (This is being run on OSX) So I switched gears ...
4
votes
1answer
66 views

update_terminal_cwd demystified please?

I am trying to find the documentation on what, exactly, the printf command is doing in update_terminal_cwd. If you didn't know already, the update_terminal_cwd function is defined (at least on Mac OS ...
3
votes
1answer
46 views

xxd not found in Recovery Mode, Mac OS X 10+

In Recovery Mode, I was trying to access my password hashes, except bash 3.2 returned command not found for xxd. Any help would be appreciated.
0
votes
2answers
29 views

OS X command line installer track progress

I am trying to install an application through command line in OS X. This is what I am trying: hdiutil attach app.dmg cd /Volumes/appvolume installer -pkg app.pkg -target "/" This works fine, ...
1
vote
1answer
49 views

Trying to install Ant but getting -bash: brew: command not found

I have installed Homebrew using the code ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" it returns this inside the Terminal window ==> This script ...
9
votes
1answer
367 views

Terminal - how to restart session after inadvertently exiting?

Sometimes I inadvertently exit from a Terminal session (usually because I think I'm connected to a remote system, when I'm not), so I get to this point: How I can I restart the session at this ...
4
votes
1answer
56 views

Duplicating and renaming Finder selection to the same folder in one clean step?

Is such a thing possible? I have this code which can do the above: set now to do shell script "date +%Y-%m-%d' '%H.%M.%S" tell application "Finder" set finderSelList to selection as alias list ...
0
votes
1answer
15 views

Changing configurations for Jrnl

Greetings to the apple community. I'm a newbie to mac and the terminal and I have no previous exposure to Linux. I have only casually used computers. However I've been wanting to step up my game and ...
0
votes
2answers
63 views

Combine files by name and zip

How can I automatically ZIP files with same file names (different extensions) into one ZIP? For example I have four files king.jpg king.txt queen.jpg queen.txt which would led to king.zip ...
2
votes
2answers
56 views

DefaultKeyBinding.dict: Can I use it to rebind keys on OS X?

I need a custom keyboard shortcut for back slash \. I have created ~/Library/KeyBindings/DefaultKeyBinding.dict and put this in it: { "@ö" = ("insertText:", "\\"); } It is supposed to trigger ...
3
votes
3answers
216 views

Best way to check in bash if Command Line Tools are installed?

Using bash, I want to check if Command Line Tools are installed. Currently they are and when I will type xcode-select --install I get: xcode-select: error: command line tools are already ...
1
vote
1answer
9 views

How do I edit keyboard shortcuts in Nano?

Is there a way to edit the keyboard shortcuts in Nano? I would like to change Move to next word from Right: Ctrl + Space and Left: Alt + Space, to Alt + ← or →. According to this thread on ...
0
votes
0answers
19 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
1answer
144 views

How can I create bash_profile and bashrc [duplicate]

OS X 10.11.2 El Capitan I want to create some alias, so I go to ~/ folder and there is no .bash_profile or .bashrc. I have been looking for some info and I learn that .bash_profile is only read ...
0
votes
0answers
16 views

bit lost wrt to permissions and users

So I am installing postgresql and it mostly works, kinda. I have a user postgres that was create by the postgres createuser commmand. I understand that the intent is a do-nothing user that can just ...
0
votes
2answers
47 views

How do I make my Mac use .bash_profile to add extra paths after I statically set $PATH?

I, like an idiot, decided to export PATH=/usr/local/sbin/. After some googling I was informed that one should use a .bash_profile file in the root directory of your user which you can use to append ...