The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

7
votes
1answer
216 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
73 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
42 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
253 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
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/...
0
votes
0answers
17 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
65 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
55 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
72 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
87 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
52 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
119 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
92 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
77 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
39 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
47 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
42 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
237 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
179 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
49 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
106 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 ...
0
votes
1answer
21 views

What environment variables are set in .profile for OS X?

I accidentally overwrote my .profile file and I believe deleted my environment variables. To be honest, I don't really understand how the operating system handles environment variables. My rough ...
2
votes
1answer
71 views

/usr/local/bin/ not found by Automator and Java but exists in Terminal [duplicate]

Automator Shell Script echo $PATH eval /usr/libexec/path_helper -s echo $PATH Results: after the first echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin after the second echo $PATH: /usr/local/bin:/...
0
votes
0answers
176 views

El Capitan Mac: /usr/bin/login tries to run /bin/false

Just upgraded from Yosemite to El Capitan, and I started out with an Emacs problem: it wouldn't launch from the Emacs.app icon, complaining that it couldn't find /bin/false. I tracked this down to ...
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. ...
0
votes
0answers
18 views

Odd behaviour for long commands after styling the terminal

After putting the following statements on the ~/.bash_profile file: # STYLING THE TERMINAL # References: # - http://apple.stackexchange.com/questions/33677/how-can-i-configure-mac-terminal-to-have-...
1
vote
1answer
170 views

Shell command or series of commands similar to the Automator action “Get Link URLs from Webpages”

I have a long list of URLs. Contained within each of these webpages, there are links I need to extract. The Automator action Get Link URLs from Webpages is a very useful action for this task. ...
1
vote
1answer
37 views

Setting up execution path in Terminal

I have no experience with using Terminal but I am trying to install a program msbayes (installation instructions here. The instructions say to set up an execution path using either $ echo 'export ...
2
votes
2answers
97 views

What is the most OSX or Darwin-like command-line experience available (without buying an expensive Mac or hauling my production machines home)?

I want to emulate the command-line experience from OSX with a small netbook and practice my skills with the comfort of this small machine. Surely Apple offers actual Darwin Links for developers or ...
1
vote
2answers
40 views

Problem with scripted account deletion syntax

I'm working on an account cleanup script module that can handle the hidden and unhidden accounts we're creating in bulk on new MacOS systems. We've kept the logic simple to start. However I keep ...
0
votes
1answer
128 views

terminal -bash: command not found

I'm trying to compile a c++ program on the Mac terminal with gcc then the source files path. I've found some short term fixes on the Internet but I want it so it works every time. Also I hardly know ...
0
votes
1answer
71 views

Why don't changes in the bashrc file work on a new terminal window?

I'm trying to add an alias to the bashrc file. Since I'm not good at this, Im' going to write all the steps I took nano ~/.bashrc The file had this in it export PATH="$PATH:$HOME/.rvm/bin" # Add ...
0
votes
1answer
112 views

Homebrew won't link git

I am trying to enable autocomplete for git on my mac (currently running El Capitan) but I am having troubles with Homebrew. So far, I have installed bash-completion and added the lines in my ...
0
votes
0answers
18 views

How to generate pdf with MS WORD 2011 from Command line?

Is there a way to call MS Word 2011 from the command line to generate pdf from DOCX or PPTX?
1
vote
0answers
284 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 ...
0
votes
1answer
15 views

Bash looping directories

My simple task is to create within the workdir up to max separate dirs copy within it some files from the template dir (so every new dir is replicas and the difference only within it names defined ...
0
votes
0answers
83 views

Remove All Illegal Characters from All Filenames in a Given Folder and subfolders

I Know this was was basically answered on the net and using automator with the shell script (Sanitize Filenames) works great, but I need it to also do all subfolders as well. And if possible trim 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 ...
0
votes
1answer
44 views

How to display an image above the needed window in needed position?

In Linux, I have bash script, which uses conky (for display image above windows in needed position of monitor) and xdotool (for check if needed window in focus, and if it is, then launch conky). So, ...
2
votes
2answers
56 views

.bash_profile not updating until open new Terminal window

I am trying to create a Terminal command. I have created this so far: cd ~/ && touch .bash_profile && echo "" >> .bash_profile && echo "alias sendtext=\"osascript -e 'on ...
0
votes
0answers
16 views

“Display Notification” stuck in loop in Bash script

Is there any way I can fire a banner notification once through a bash script? I'm trying to modify this BitBar plugin to be a little fancier: #!/bin/sh # <bitbar.title>Gmail Checker</bitbar....
1
vote
1answer
41 views

Remove characters preceding the second underscore in file names

I have a bunch of files and I would like to remove all characters preceding the second underscore in the file names. An example is shown below. How do I do this using bash commands? [From] ...
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
1
vote
1answer
92 views

iTerm2 does not show username, machine name, time

On my new mac machine, I could not do autocomplete for Git when I hit Tab. So I thought to modify the terminal and found certain things on this link. I may have messed when I installed iTerm2, Oh-My-...
3
votes
1answer
203 views

Launchd script to mount volume on boot

I have a script monta.sh to mount an external volume: #!bin/sh mkdir -p /Volumes/remvol mount_smbfs //user:password@server/folder /Volumes/remvol Then I have a com.jo.monta.plist to launch the ...
3
votes
1answer
51 views

Recognise command and colour it on the terminal?

I was wondering if it's possible to colour a recognised command in real time while typing and/or when switching to previous commands using the arrows. For example, if I start typing gre, it should ...
1
vote
1answer
79 views

Setting Terminal tab names in OS X and using vim

I regularly ssh into a Linux cluster from an OS X (El Capitan) Terminal, sometimes with multiple Terminal tabs. I use bash and vim. I'd like to do the following: while ssh'd, set the Terminal tab ...
0
votes
1answer
92 views

How to grep with filename highlighted in one color, and the match highlighted in another color?

On the Mac, I can't seem to use grep and have the filename highlighted (or in) a certain color, and have the matching string in a different color. Is there an easy way?