The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
2answers
250 views

How to re-install deb package from MobileTerminal (iOS) [jailbroken]

I am trying to run a command to re-install an already installed package. Here is what I see that gives me a clue that I am on the right path, but it doesn't install the package: su ****** apt-get --...
-1
votes
0answers
14 views

Hold item System Prefs

How to lock System Preferences item only to staff group members?
1
vote
1answer
79 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 one,...
7
votes
1answer
12k views

To install Brew's ImageMagick and fix its Symlink

Assume you installed Imagemagick by brew install imagemagick but it does not get into your PATH. For example, I run unsuccessfully compare since imagemagick is not in PATH: -bash: compare: ...
0
votes
0answers
4 views

Open Directory network user last logon time

I am looking for a bash command to query my LDAPv3 server from the client side in order to find the current user's last logon time.
0
votes
1answer
17 views

Bash Script that only runs in terminal

I created a Bash script that should be able to be ran on any machine. The problem I'm having it'll only run in terminal. When a user double clicks the script, some users have it open up in iTerm, and ...
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
13 views

How can I cd to an alias directory in the Mac OSX terminal without creating symbolic link [duplicate]

I used to be able to cd into aliases with my Mac. Today I was messing around with ~/.bashrc and ~/.bash_profile to make PostgreSQL work. After I restarted my computer it stopped cd'ing to aliases and ...
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 ...
6
votes
3answers
2k views

Tab completion for hosts defined in ~/.ssh/config doesn't work anymore on Yosemite

I'm trying to create my ~/.ssh/config file for simplify my work life on the server connection. In Mavericks all worked properly and with the tab I was be able to autocomplete the hostname with file ...
7
votes
1answer
217 views

Why does OS X have bash v3.2.57?

OS X comes with bash version 3.2.57 instead of bash version 4.3.39, which GNU lists as the current stable release of bash. Is there any way to upgrade bash on Mac OS X?
0
votes
1answer
16 views

srite a script that installs a package file automatically with limited interaction from user [duplicate]

I'm trying to run a package installer from terminal and have it complete with limited interaction from the user. This will need to be ran on any computer. The bash script I have so far is: sudo ...
3
votes
3answers
144 views

Bash script to click button on an HTML page

I'm trying to write a Bash script that opens a browser, clicks an HTML button on a webpage, and closes the browser after getting response. I need this script to be executable from within Terminal. If ...
2
votes
1answer
29 views

Bash Script That Automates A Software Install

I am trying to create a bash script that automates all parts of a .dmg/pkg software install. For example, the script should pull the installer from here: http://download.techsmith.com/snagitmac/enu/...
5
votes
6answers
11k views

How do I restore my .bash_profile?

I've accidentally overwritten my ~/.bash_profile file. Does anyone have a "sample" one I could copy, or know where I might be able to find one?
0
votes
0answers
10 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", "...
1
vote
4answers
578 views

Shell command to count pages in a PDF (other than pdftk)?

I have been using this to get a page count of PDFs in shell scripts in OS X: pdftk "$i" dump_data | grep NumberOfPages | awk '{print $2}' | tr -dc '[0-9]' (where $i is the PDF filename) However, ...
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 ...
1
vote
1answer
34 views

Why find and exec with multiple conditions doesn't work without parenthesis?

I have two very similar find commands only one of which works. Since it's relevant, I must mention that there are no files with .c or .hpp extensions. # That one works find ~/src/ \( -type f -iname '*...
0
votes
1answer
28 views

How to use iTerm along with the default bash terminal?

I want to use iTerm with my default bash terminal because there is a lot of customization that i have done to my .bash_profile and I don't want to lose it or perform all the hard work again.
0
votes
1answer
47 views

Git auto-completion not working on Mac OSX 10.11.5 El Capitan

I have tried the examples found here to get Git auto-completion working on El Capitan, however none of the examples work for me. I installed bash-completion with Homebrew (brew install bash-...
15
votes
3answers
10k views

How to enter special characters so that Bash/Terminal understands them?

Let's say a folder has a file called Näyttökuva.png (for those who are interested, it is ”screenshot” in Finnish). This is what happens: $ ls Näyttökuva.png $ ls N* Näyttökuva.png $ ls Nä* ls: Nä*: ...
3
votes
2answers
62 views

Making ~/.bashrc function callable to set up an environment

I have an installed app lets call it my_app that I wish to be able to call from the command line. It is located in /Applications/my_app.app/Contents/Resources. So what I was hoping to do was to have ...
2
votes
2answers
88 views

How can I rebind keyboard keys in 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 ...
2
votes
0answers
19 views

could .bash_profile, in theory, be slammed into the iCloud Drive and symlinked? [duplicate]

could .bash_profile in theory be slammed onto iCloud Drive and symlinked from there? I'd love to use the same .bash_profile on every computar. Why this isn't the same as Dropbox - this, if answered, ...
0
votes
0answers
13 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 ...
6
votes
2answers
2k views

Change my shell to a different bash version at /usr/local/bin/bash?

How can I set my /usr/local/bin/bash (which is the 4.2 version that allows auto-completion of 'cd to directory with directory name') to be my default bash for a new window instead of my regular (v3.2....
1
vote
3answers
111 views

Is there a way to list all available commands in terminal

Is there a way to list all available commands in terminal? I know linux has compgen -c is there an equivalent command for OS X? Update: The actual issue was that I was using zsh instead of bash. So ...
0
votes
1answer
22 views

Automator Action/Bash Script for selecting files from a list

As a part of my workflow, I often face this scenario: I have a folder with let's say, 100 files named 1.mov to 100.mov I have a list of valid files let's say, files 1.mov, 2.mov .... 15.mov (These ...
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, ...
-1
votes
1answer
71 views

Batch copy time creation and modification date from files using OSX

First of all, I have asked the same question at stack overflow, but I am not sure if it's right over there. That's why I decided to post it here, too. t'm having a hard time trying to copy the ...
-1
votes
2answers
31 views

-bash: /usr/bin/svn: No such file or directory

I am trying to upgrade my svn version. So I deleted older binary sudo rm /usr/bin/svn Then I installed svn brew install svn And linked it too athakur:home athakur$ brew link --overwrite ...
0
votes
2answers
58 views

I get a bash syntax error message every time I open Terminal on macbook

-bash: /Users/admin/.bash_sessions/720116FC-4C25-4FFA-AC15-00D5C843C15F.session: line 1: syntax error near unexpected token (' -bash: /Users/admin/.bash_sessions/720116FC-4C25-4FFA-AC15-00D5C843C15F....
1
vote
2answers
59 views

How to pass a file set as a variable from AppleScript to a Bash shell script

I've got a two part problem. I am trying to pass a variable from AppleScript to be used as a variable inside a bash shell script. I cannot figure out how to this work. I have read about ...
7
votes
1answer
7k views

Missing .bash_profile and .bashrc files

I don't have .bash_profile or .bashrc files and I am definitely using the bash shell. I am using Mac OS X 10.11.1 El Capitan. How do I permanently modify my $PATH to cut down the default values Apple ...
0
votes
1answer
72 views

ICMP packet with a negative round trip time?

I often keep a ping running in my Terminal so that I can pop it up to keep an eye on any network issues in our office. Recently, I ended a long-running ping session and noticed in the summary ...
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 ...
0
votes
0answers
37 views

FFMPEG convert multiple .MOV files to .MXF using Automator

I need some help with an automator solution. I'm trying to add a Shell Script action to process a list of videos. My first try is for f in "$@" do fbname=$( basename "$f .MXF) /opt/local/bin/...
147
votes
6answers
71k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. [Note we are talking about git branch completion, not bash completion (e.g. commands, files, etc). Thus NOT lane's answer at all] For ...
0
votes
1answer
120 views

Last command source file

Despite what I thought, there does not seem to be any concrete/modern answer on the net, so my question is: where does the last command get its information from? I have found the file before, but ...
34
votes
4answers
89k views

Getting files, all at once, from a web page using curl

I would like to download the files, all at once, from the following page using curl: http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/ I tried curl http://www.ime.usp.br/~coelho/mac0122-2013/...
2
votes
2answers
307 views

Why is my BASH script being executed twice? I'm using launchd

I have one plist associated with this launchd agent. There is one agent listed in launchctl list, and it calls my bash script, called rc.wakeup, whenever the mac is woken up from sleep. There is only ...
8
votes
3answers
855 views

Moving .bash_profile to Dropbox

I'd like to move my .bash_profile to Dropbox to have my custom Terminal functions available on all my Macs. Is this possible and are there possible implications? For example I have a command for ...
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 ...
2
votes
0answers
29 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
3answers
500 views

How to show vi mode in bash?

I'm on Yosemite, using vi mode in bash (set -o vi in .bash_profile) and I want to have the prompt indicate if I'm in edit or command mode. I looked around and found that this feature has been ...
2
votes
2answers
82 views

Log file that `sudo last` accesses?

The bash command last (needs sudo) prints out logs, which contain information on when different users log in/out of the shell. I have been looking for the file that stores this information, that last ...