The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
17 views

Turn Wifi off/on with a single key?

Is there a way to assign the WiFi on/off function to one of the function keys like F4 that I otherwise never use? I assume Applescript would be required. However I may want to use a BASH script ...
0
votes
0answers
8 views

Nano: how to obtain syntax highlighting?

I have a default installation of nano under /usr/bin/, and I am trying to make nano highlight the bash scripting language code. I have been searching around, but I had no success: I got always some ...
0
votes
0answers
20 views

Show Google Search in Address Bar in Safari v8.0 in OS Yosemit

I'm trying to show/hide google search in Safari v8.0 in mac os "Yosemite" using bash script, I used the following command in terminal but it didn't work even after I restarted Safari, so am I doing ...
0
votes
1answer
18 views

Enable Web Inspector in Safari v 8.0 in Yosemite OS

I'm trying to show/hide the web inspector tool in mac os "Yosemite" using bash script, I used the following command in terminal but it didn't work even after I restarted Safari, so am I doing ...
1
vote
1answer
21 views

How to hide favourites bar in mac os using bash script?

I'm trying to disable and enable the favourite bar in mac os "Yosemite" using bash script, I used the following command in terminal but it didn't work even after I restarted Safari, so am I doing ...
0
votes
0answers
6 views

AppleScript and Configurator

I have written a bash script to modify a mobileconfig file (iOS profile in a xml-plist format) as per this link and I am now in the process where I would like to interact with Configurator via ...
0
votes
1answer
53 views

Update bash to version 4.0 on OSX

Is it possible to actually update bash to version 4.0 in OSX Yosemite? echo $BASH_VERSION 3.2.57(1)-release This article and this thread refer to the same question, but they install a new shell ...
0
votes
1answer
25 views

Paste tool for OSX

There is paste tool in Linux but have not found for OSX. Its name was probably dpaste or something in Linux. Assume you run xxd -ps r328.raw | head -n2430 and you want to paste it to your friend. ...
0
votes
1answer
22 views

What is the “host name” in bash? (\h or \H)

I set PS1="[\u@\H \w] in bash. So it should print the host name. But I do not understand the meaning and nature of the host name. Basically, I would assume that it is just a name I assigned to my ...
0
votes
1answer
24 views

Warnings when installing pip

I just installed pip and got a few warning messages. Should I be concerned? Is there a way to check that pip was installed properly? Here's what I did: [mchenja@mycomp ~]$ sudo easy_install pip ...
0
votes
0answers
11 views

How to open application through notification in terminal shell

I have the following command to run in a terminal shell script: osascript -e 'display notification "This is a Text" with title "This is a Title"' This is a shell code running in applescript to open ...
2
votes
1answer
317 views

Removing computer name from terminal

Right now, this is what my Terminal shows: MyName's-MacBookPro:location MyName$ I'd like for it to only show my name, so something like this: MyName$ When I browsed online for a solution, they ...
0
votes
3answers
71 views

I broke PATH in terminal and I can not restore it

in .bash_profile I accidentally set the path to: PATH="~/Tools/apache-maven-3.3.3/bin" and now the default path is gone. Nothing in Terminal works anymore: Korays-MacBook-Pro:~ koraytugay$ ls ...
0
votes
0answers
11 views

Check access to share BEFORE mounting

Quesiton: Can I check access to a share before I mount it? I'm using various bash scripts on Mavericks 10.9.5. One script mounts shares, based on group membership. Due to the nature of the script, ...
1
vote
2answers
61 views

Install Monokai Theme on Terminal with prompt colors, etc.?

I already have a Monokai theme installed in Terminal, as so: I was wondering how I could get the rest of the Monokai (as Sublime uses) into Terminal? Like, making the prompt (Gamma@~) colored, etc. ...
0
votes
0answers
12 views

To use XCode for Deparse converted Perl Script [migrated]

Minimum Script for Practicing conversion of terminal scripts into Perl and using them finally in Xcode use strict; use warnings; ## Conversion of one-liner into Script by perl -MO=Deparse # Original ...
0
votes
0answers
25 views

os.Popen command is not working

I'm writing a python script that is suppose to change default display settings for all users. I run the script as sudo because it needs to change every display. This line is suppose to change the ...
0
votes
0answers
13 views

How to mount a Windows shared folder with a bash script? [duplicate]

I'm writing a script to copy a group of files from a shared folder on a Windows computer to a folder on my Mac. I am able to manually mount the volume using Finder > Go > Connect to server, ...
-1
votes
1answer
23 views

How do I configure my Terminal app with bash and iTerm2 with zshell and oh my zsh?

The Terminal app uses bash by default. And I don't want to change it. However I want to configure iTerm2 with zshell and oh my zsh. and I don't want bash on it. The instructions I checked online, make ...
1
vote
3answers
84 views

To give STDIN for Sed?

Pseudocommand echo '1,2,3,5' | sed -n data.txt which gives sed: 1: "data.txt": extra characters at the end of d command I want to give linenumbers for search from other command. Actually awk ...
10
votes
2answers
1k views

How to prevent 'sudo rm -rf /'

A few times I have accidentally executed the command sudo rm -rf /. Is there a way how to prevent me from running this command? For example can I somehow disable it using the sudoers file?
5
votes
1answer
592 views

Why does OS X terminal need manually sourcing to display colour?

I have the following in my ~/.bash_profile file: export CLICOLOR=1 export PS1="$FBLU[\#]$RS--$RS{\t}$RS$FWHT\W$RS$FMAG@$RS$FRED\u$RS$FCYN\$$RS$FBLU>>>$RS" # ANSI color codes RS="\[\033[0m\]" ...
1
vote
0answers
26 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\]\$ " ...
2
votes
1answer
144 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 ...
2
votes
1answer
72 views

How to upgrade bash with brew (permission error)?

I work with Yosemite (10.10.3) and would like to upgrade bash (to version 4.x) and found this post. After brew update, I did brew install bash, but obtained: ==> Downloading ...
3
votes
4answers
48 views

Set bash_profile to open with Sublime Text 2 by default

I'd like Sublime Text 2, not TextEdit, to be the default program to open my bash_profile file when I call open ~/.bash_profile in Terminal. Normally I would just control-click on the file in Finder to ...
0
votes
0answers
16 views

change bash color profile on su $username

With my useraccount I use a .bash_profile that contains this line: export PS1='\[\e[0;36m\]\u\[\e[0m\]@\[\e[0;33m\]\h\[\e[0m\]:\[\e[0;33m\]\w\[\e[0m\]\$ ' With my adminaccount I use a .bash_profile ...
0
votes
0answers
38 views

Bash Terminal Environment variables = dollar sign

I think I'm having trouble with environment variables (I'm trying to install seismic unix, the make install doesn't work, and I think that environment variables are the problem). The makefile calls a ...
3
votes
1answer
133 views

Script to change Computername/hostname causing bizarre Terminal behavior

I have a script (mostly borrowed) which utilizes scutil to rename computers based off of values in a CSV file. It matches the serial number to a computer name, sets a variable, and then renames the ...
0
votes
0answers
42 views

Trying to run commands in bash causes Homebrew error

Whenever I try and run any commands in terminal (bash), my window goes crazy and it keeps looping through an output of: /usr/local/Cellar/rbenv/0.4.0/libexec/rbenv-hooks: line 32: cd: ...
0
votes
1answer
17 views

create custom links in OSX dock

I have a program that runs from the command line but not correctly from the icon in the applications menu. While I would like to figure that out, all I want right now is way to create a link in the ...
1
vote
1answer
26 views

cannot locate app, locate not working

I have an app (gv) where I can run it from the terminal, but when I click on it, I get errors. This makes me think there are multiple instances of it or something. I tried which and got nothing... ...
0
votes
0answers
16 views

Terminal [Bash 3.2.53] “line up” keystroke

What is the key combination I need to move the cursor up 1 line while in Terminal? If I use the key binding "Ctrl+p" [like in emacs] all I get is the previous command. TIA for your time.
0
votes
1answer
24 views

Textmate's Filter Through Command

I run anything there on document or selection I get /bin/sh: pandoc: command not found I installed pandoc by brew install pandoc My pandoc's version is 1.13.2.1. There is probably ...
1
vote
1answer
64 views

Set Bash Variable as Icon in osascript -e Display Dialog with icon

I have a bash script that utilizes some osascript -e code for a dialog. I want to use a custom icon in that dialog. However, I don't understand how to code it so it's completely portable so as to make ...
1
vote
2answers
60 views

Automated screensaver configuration in command line/shell script

So I'm configuring some Default User Template LaunchAgents to configure a default screensaver for some of my company's most popular fan art. (It's actually been really well received by the team). ...
0
votes
1answer
28 views

Some aliases return 'No mapping found'

After editing .bash_profile, .bashrc, .inputrc dotfile config my aliases went silly. Some aliases work as expected. Others for no apparent reason return: No mapping found Press ENTER or type command ...
0
votes
1answer
47 views

-bash: command not found appears every time

I just recently discovered what terminal was. I started using it today and every time I try a command (like shh) it says that the command was not found. I was instructed to type in echo $PATH and this ...
2
votes
2answers
111 views

What does adding PATH to .bashrc do?

I'm following this guide to install Linux commands onto my OS Terminal: https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ and I see that the second line tells ...
0
votes
1answer
44 views

bash- command not fount error

I tried to install omnet++ on my Macbook pro (OS 10.10) yesterday. I got an error so I delete path in my bash-profile. Now, every command I try to run in my terminal shows an error of command not ...
1
vote
1answer
17 views

generic approach to finding the correct name to run an app from the command line

Whenever I am not in a browser or in my text editor, most of my time on my mac is spent on the terminal. What's a quick, generic way to figure out how to run a gui program from the bash shell? It ...
0
votes
1answer
55 views

Is it possible to enable Code Folding in Xcode for Bash scripts?

I work a lot with bash scripts and some of them can get pretty lengthy. Up until now, I've been using BBEdit as my editor of choice because of the way it handles locked files and permissions. But ... ...
2
votes
2answers
356 views

How to find .bashrc or .zshrc?

I just got a MacBook Pro and am in the process of trying to get GNU commands installed. I'm following this guide, but I don't know how to do: Then add the following line to your .bashrc or .zshrc: ...
2
votes
0answers
25 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?
0
votes
0answers
42 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 ...
0
votes
2answers
101 views

Launchctl says plist is invalid, plutil says it's OK

I'm trying to have launchd run a shell script when I join a new WiFi network. I've created this plist file (closely based on this SuperUser answer) at ...
0
votes
0answers
22 views

Need Help with Post-install Script to Switch Off “Displays have separate Spaces”

We have an PC application adapted to run on the Mac using Wine that we install using Apple's Installer. Because Wine uses X11 to display the adapted application's GUI and because of the way X11 (aka ...
2
votes
0answers
18 views

In iTerm, how can I change alt+delete to ignore slashes?

I set up my iTerm to work a lot like OSX does in other text fields, eg ⌘ Command+Delete = delete line backward, ⌥ Option+left arrow = "move cursor back one word" and ⌥ Option+Delete = delete word ...
-1
votes
1answer
67 views

How to create a bash alias on OS X?

I want to create a bash alias on OS X, because I need to type on a really large command. I've found some answers about the same issue on ubuntu, like this one, but they mention the ~/.bashrc file, ...
3
votes
1answer
124 views

How to schedule run of .command file (bash)?

I have a bash script (saved as myfilename.command) and would like to schedule its run. I've tried to use Calendar event for this (which works fine with Automator scripts), but I get the following ...