The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
68 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
16 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
2answers
39 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 ...
0
votes
1answer
107 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 ...
0
votes
0answers
11 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 ...
7
votes
3answers
808 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 ...
1
vote
0answers
27 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
2answers
74 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 ...
1
vote
1answer
38 views

date command gives no output

I made an alias earlier today that I saved in my .bash_profile. The alias was called date. I had momentarily forgotten that date is already a native command on OS X (and Linux) in /bin. I removed the ...
1
vote
1answer
85 views

Use script without root

I write a maintenance script with different commands. the script has sudo commands inside. Now I want to use crontab, but my first problem is: How can I use the script on user level without root ...
0
votes
1answer
33 views

What automatic script runs with Bourne Shell (/bin/sh) for root?

I want to add some aliases to my OSX command line environment for easier navigation when in the root prompt (sudo su to root). On the Bourne Again Shell (/bin/bash), I can edit /var/root/.bash_profile....
3
votes
2answers
63 views

How can I get the dev name associated to a Volume name?

I am creating a bash script to unmount my usb drive after the backup is done. To unmount the drive I use the command: diskutil unmount disk4s1 But sometimes when I plug my usb drive it gets a ...
1
vote
1answer
36 views

OSX Unmount usb disk drive from Automator bash script

I have a task in automator to make my backup, it runs shell script code, lot of code is working well but the unmount command doesn't works, I don't get unmount the unit after backup. I checked to run ...
4
votes
2answers
135 views

How can I run a shell script that prompts for user input from within Applescript

I have two pieces of code. One is Applescript and the other a Bash shell script. The shell script needs to run concurrently with the applescript, return some values and then exit. The problem is the ...
3
votes
1answer
44 views

El Capitan get current desktop name from bash

I am trying to write a bash script that needs some identifier of the current active desktop (I want my emacs-clients to connect to different servers depending on the active desktop). I have searched ...
2
votes
1answer
20 views

How to export Moom settings (especially keyboard shortcuts) to external file?

I'm working on some shell scripts to customize OS X to my preferences just by calling one script. From a lot of native OS X options, script is going to easily import some predefined settings form 3rd ...
0
votes
1answer
32 views

Help Understanding Terminal's Command

OS X 10.11.5 on a Mid 2011 iMac. I'm new to development on OS X and am trying to understand enough to figure out a Ruby path issue I'm having. I ran Inspector on Terminal and was surprised by the ...
0
votes
1answer
64 views

Creating a Installpackage for mac

I have a lot of Programms that i always need to install to a new mac. I wanted to simplify this process through an installpackage. I allready tried Iceberg with some success but have a specific error. ...
0
votes
1answer
54 views

How can I edit the .bash_profile?

I want to use matplotlib in Python, but it gives me this error "ValueError: unknown locale: UTF-8". So I searched the internet and people suggest that I should edit my .bash_profile. But when I open ...
0
votes
1answer
32 views

OS X Automator: Using custom command in AppleScript's “do shell script”

I have recently asked a question about automatically inserting a value produced by a custom executable into a prompt field. Please look over this post to know exactly what I am talking about. The ...
2
votes
3answers
147 views

Set the result of command to variable in Terminal post execution

How can you set the output of a command run in terminal to a variable after it has run? Background (You can skip of you don't need the background) I run VirtualBox VM and do a lot from the command ...
1
vote
2answers
40 views

Why does 'set -x' cause the terminal to dump garbage

This problem is quite annoying and I cannot search Google for 'set -x' because the minus sign has another terminology there. In my MacBookPro, when I use 'set -x' to debug bash commands, I'm getting ...
1
vote
0answers
34 views

Are there any advantages to using GNU over the default OSX command line utilities? [closed]

Are there any advantages to using GNU utilities (installed via homebrew) as opposed to the default, BSD based OSX utilities? They seem very similar to me, but I will not pretend to be a master of ...
2
votes
0answers
32 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 ...
0
votes
1answer
31 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....
3
votes
1answer
161 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
68 views

Extract text between two unicode symbols using AppleScript or bash?

My goal is to take text from a standard .txt document, and use (preferably) Terminal or Applescript to extract text between the symbols ▶ and •. While there is only one ▶ symbol there are multiple ...
1
vote
1answer
36 views

Change iTerm2 profile depending on current directory

Using my .bash_profile, I used to change my iTerm2 profile per machine with the following command: echo -e "\033]50;SetProfile=ssh\a" Now, I want to change it depending on my current working ...
12
votes
4answers
238 views

in terminal, I cannot type lower case e

2015 MBP, fully up to date OSX I open a terminal window and if I type the letter "e" (without quotes of course) it beeps and will not type the letter. Every other letter works just fine in terminal. ...
0
votes
1answer
31 views

Is it possible to create a service using only the shell and bypassing automator altogether?

Using automator is somewhat of a tedious task. Using the shell in the Terminal is much easier all around. Even using the "Run Shell Script" action inside automator is not the same as using the actual ...
0
votes
0answers
28 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/...
0
votes
0answers
15 views

$PATH change won't persist [duplicate]

I looked at my $PATH and noticed that it starts with: /Applications/anaconda/bin: This doesn't seem right to me and I am not sure how it got there, so I tried to reset $PATH in terminal using: ...
1
vote
2answers
62 views

Using launchd to monitor a running program or process

I've written a simple bash script to check whether a program (supplied as its only argument) is running and send an email to a set address in the script if it's not. The script works if run on the ...
3
votes
2answers
50 views

How to Change USB Thumb icon using Terminal or Bash/other scripting language

I'm looking for a method to change USB or External Drive Icon using bash or any other command line method. I know how to manually chnage them like this I am using El Capitan
0
votes
0answers
48 views

In Terminal, how do I run a curl command to POST data?

I'm using OS X Yosemite and having trouble running curl to POST data to my local server. Below is the command I'm running and the response: localhost:myproject davea$ curl --header "...
0
votes
0answers
57 views

Attach file to Outlook 2016 email using AppleScript

I am attempting to attach a tar.gz archive of system logs to an Outlook 2016 email that gets created from another shell script. The script was modified from this one at JAMF Nation. Because the file ...
1
vote
1answer
42 views

The terminal on my Mac does not work anymore after installing Python & Sublime Text

I was trying to install Python3, and Sublime Text 3 in order to learn and run Python. Unfortunately, I watched some videos on youtube and tried to follow their instructions, I did something with my ...
1
vote
1answer
89 views

Automator: “Run Shell Script” throws error because of missing “on” command

OSX 10.11.4 here. I'm trying to create a workflow for use with a hotkey, to run a simple shell script. Created via: Automator -> New Service -> Utilities -> Run Shell Script, then set to 'no input' ...
1
vote
4answers
80 views

In Terminal, how can you determine which shell is actually running?

Using Terminal on OS X 10.11.4, initializing Terminal opens a new window running bash (by default). As I understand it, inputting echo $SHELL should output the shell that said command is submitted to. ...
4
votes
1answer
68 views

Using 'alias' in bash script in OSX

I write some scripting and I want to make it work on Linux and Mac. The problem is, that "Implementations of sed, readlink, zcat, etc. are different on OS X and Linux." So I tried THIS approach, but ...
0
votes
1answer
24 views

How do I remove a ColorSync profile from a JPEG image from Terminal in El Capitan?

I have several images that I would like to strip the ColorSync profile from. Eventually, I would like to automate this in bash so I could easily process this on a file or folder from the contextual ...
0
votes
1answer
42 views

Mac OSX equal to linux time command

What's binary that will give exact result for Linux's time command flags? alias tcmd='/usr/bin/time \-f\ "CPU: %Us\tReal: %es\tRAM: %MKB"' Current time in Mac OSX for command above is: /usr/bin/...
0
votes
1answer
32 views

What's ls option in OS X does what ls -w 1 in Linux does, showing output in one column?

In Linux ls -w 1 shows list of files in 1 column instead of multi-column. What flag or other command will produce the same result in OS X? Current output under OS X: ls: 1: No such file or directory
1
vote
3answers
139 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: /...
0
votes
3answers
109 views

How do I run a .sh or .command file in Terminal

I've always wanted to be able to run a script I've downloaded online directly from the Finder but just double clicking the file does not work.
0
votes
0answers
19 views

How can I auto resume background jobs upon login

I'm running a bash script over several days. When I put the laptop on sleep and log back in, the script is stopped. I have to send the kill -CONT message to the process for it to resume. Is there a ...
1
vote
2answers
45 views

Why doesn't pbpaste return cursor at new line in bash?

I run the command pbpaste in Terminal (bash) to get the result of my clipboard, but unlike other commands which leave the cursor at a new line below the previous stdout, pbpaste leaves it to the right ...
0
votes
1answer
62 views

Is there a `watch` command native to Darwin/OS X?

I have a script that I'm trying to port from Linux to Darwin/OS X. The Linux version currently depends on the watch command, which doesn't appear to be installed on Darwin/OS X by default. What's the ...