The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

2
votes
1answer
21 views

Running shell scripts in single-user mode

I'm planning on running a couple of scripts in single-user mode to speed up (and simplify for less savvy users than myself) the configuring of a few aspects of some Macs that I set up for other ...
3
votes
1answer
29 views

Put Back from trash from Terminal

I sent a lot of files and directories from an external hard drive into the trash by mistake. All those files and directories had the same grandfather directory but not the same father directory. I can ...
0
votes
0answers
17 views

How to undo a $PATH variable change? [duplicate]

Is it possible to undo a change to the $PATH variable on OS X Yosemite? I was trying to add to the $PATH and accidentally changed the entire thing to one path. I just need to know if I can undo this ...
2
votes
1answer
37 views

Changing MAC Address and undoing changes

I was trying to change my MAC address. I saw an answer that suggested I disassociate my device with this: sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z sudo ...
4
votes
2answers
174 views

How can I display contents of trash using terminal?

How can I display contents of trash using terminal?
3
votes
1answer
32 views

Permanently saving changes to $PATH [duplicate]

I have ruby and homebrew running for a while and I'm starting to play with Bash. I have encountered a problem with my PATH variable as echo'd: ...
2
votes
0answers
16 views

Terminal: disable printing/output of keyboard commands

I have the same problem as this person – I am running a C script and somehow when I pass the EOF signal with Ctrl+D, ^D gets printed to the console. My question is therefore: is it possible to ...
25
votes
5answers
4k views

Did `man ls > temp.txt`. Output textfile is corrupted

When I execute man ls > temp.txt the output text file is corrupted. By corrupted I mean that first and last letters in some words are overly repeated. Several first lines in temp.txt: LS(1) ...
0
votes
2answers
32 views

Dock shortcut for an interactive bash script

I'm new to OSX and all I want it an application shortcut in Dock that opens the terminal and types the first command and waits for me to provide the password. Here is the script I want to run: ...
0
votes
0answers
37 views

Mac doesn't recognise simple commands like 'ls'

I installed Apache and tried to change the permissions for one of Apache's working directories. After that my machine keeps changing the default path. I can't access the simple commands unless I set ...
0
votes
0answers
20 views

using FISH shell — set default folder for multiple tabs?

I'm using fish shell in OS X. Using the standard bash shell, you can open multiple tabs in Terminal, cd to a different directory in each, and then save the setup as a Window Group (via Window > ...
0
votes
0answers
27 views

Stealthy Mac, Disabling network services on OS X (Non-Server)

I have written a bash script to harden OS X Security and be as stealthy as possible. The script: Disable bonjour Start firewall and block all non-essentials incoming traffic Enable Stealth Mode to ...
0
votes
1answer
92 views

OS X 10.10.4 Yosemite, has the default PATH changed?

Today I had to configure a new macbook, running 10.10.3 out of the box and immediately upgraded to 10.10.4. After installing homebrew I went to configure the default PATH, and opened /etc/paths. I ...
1
vote
0answers
21 views

In bash script, how to have a script that runs in the background and starts when an application is opened

I'm making a script which should run when I open Safari. I want it to open when the user logs in and run in the background, then have part of the script to run when Safari opens. Is this possible in ...
1
vote
1answer
41 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
24 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
28 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
33 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
25 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
15 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
2answers
101 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
28 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
27 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
54 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
17 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
329 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
79 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
14 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
127 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
29 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
14 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
34 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
110 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
607 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
31 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
159 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
113 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 ...
4
votes
4answers
73 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
20 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
50 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
198 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
54 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
27 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
19 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
29 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
89 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
82 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
33 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 ...