The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
10 views

File contents remains in terminal after exiting Vim?

I'm using the stock terminal with zsh and vim. After I exit vim, the file contents remains in the terminal. Ideally, only the previous history would be in the terminal when I exit vim (such as the ...
0
votes
0answers
11 views

Mac OS X launchd: forbid starting a process in Power Nap (dark wake)?

What would be the best way to forbid Mac OS 10.10+ Launchd to start a Bash script when a MacBook is in Power Nap (dark wake)? Is there an elegant way to limit it only to "real wake", like: ...
2
votes
1answer
81 views

Move all contents from a folder to another with shell script

Why does this work? mv /Users/diogosaraiva/Music/Youtube/Novas/* /Users/diogosaraiva/Music/Youtube/Tratadas …but the commands below don't work? mv "/Users/diogosaraiva/Music/Youtube/Novas/*" ...
0
votes
1answer
36 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 ...
0
votes
1answer
18 views

Programmatically Change Screen Saver “Start after” time

I would like to change the time before my screen saver starts based on WiFi network. I am running Yosemite (10.10.1). I will use Keyboard Maestro to trigger the action. I need to find the correct ...
1
vote
1answer
55 views

Problem persistently defining aliases in terminal

I am trying to persistently define some aliases for my everyday terminal use. I started off with this tutorial: How to persistently define aliases in Terminal, more precisely with Mike's comment. As ...
2
votes
1answer
26 views

Using Terminal to order SSID preference in System Preferences

I'd like to find a way to add a specific SSID to the top of the preferred WiFi networks in System Preferences > Network > WiFi > Advanced. (10.9 Mavericks and beyond) According to the man page, this ...
0
votes
0answers
41 views

bash script / function to toggle ipv6 on/off yosemite needed

I am not a coder and need your help getting a function to work that allows toggling IPv6 on/off. I searched a bit and tried the following: function ipv6toggle() { e=$(networksetup -setv6off Wi-Fi) ...
1
vote
0answers
15 views

Is HISTFILESIZE behavior different in Yosemite?

For a long time I've used the HISTFILESIZE environmental variable to control the number of lines that get written to my terminal history (the default of 500 is not enough; I set it to 10000). Ever ...
1
vote
1answer
48 views

Where is the bash profile on iOS?

Where is the bash profile on iOS, I am jailbroken and can't find the bash profile, I would like to create some aliases and edit it.
1
vote
2answers
128 views

Shell not finding commands after I changed my .bash_profile file

I was following a tutorial trying to install Laravel (5.0). The tutorial showed to add export PATH="~/.composer/vendor/bin/laravel" to the .bash_profile document. Since then, I am not able to execute ...
3
votes
1answer
30 views

How do you close a file that you've opened with /usr/bin/open?

I've opened a PDF file with /usr/bin/open, and now I'd like to close it from the command line. (I'm writing a script.) How might one go about doing that?
1
vote
0answers
21 views

Terminal command not found [duplicate]

So I was going thru RoR tutorial, installed heroku, heroku toolbelt. I got an error message from Heroku to update to newvest Git for safety reasons. I tried that with installer but heroku version ...
1
vote
1answer
111 views

In Bash, can I output text from cut into a new command?

This might be a vague title, but it's hard to explain what I'm doing in a short title. I have a tool that removes adware and it mainly runs in bash. Some of the programs I want to kill may have ...
1
vote
1answer
87 views

`find` finds nfs server?

I had to run find / -name foo > found.txt and stumbled over the following output: ... find: /Volumes/MobileBackups/Backups.backupdb/mac/2014-12-17-162004/MacRoot/.DocumentRevisions-V100: ...
0
votes
0answers
14 views

dtruss -f is not following children processes?

Following is not following the child "sql.py" python process: sudo dtruss -f run-test sql.py 2>&1 Here is the output - which shows no evidence of following the invoked python: PID/THRD ...
0
votes
0answers
16 views

MAC: Icons only work on symbolic links when locked and are not updatable - need method for unlocking for non-privileged user

My client has a product based on Excel Spreadsheets which require periodic downloads. The product has been working well on PCs for several years, but there has been a lot of requests to have the ...
0
votes
1answer
79 views

Applescript to replace string using sed

I need and Applescript to replace some text as follow: Original text: string  string  string  $  text1 string  string  string  $  text2 text3 string  string  string  $  text4 The ...
2
votes
1answer
50 views

How to change the default command to open shells in the MobileTerminal Cydia package

I am using MobileTerminal on iOS 7, and want to know how to change the default shell from sh: to bash:. I assume I would need to change the login command for this, but how would I?
0
votes
0answers
53 views

Mac Reset Password Prompt/Script

So, I'm setting up Mac's for new users. I create their profile and give a default password (the same one) to each new user. My question is, when the user goes into the computer for the first time(it ...
0
votes
0answers
9 views

Add a path to the system PATH [duplicate]

Please help me figure out how to set a system wide PATH..... I have upgraded svn to version 1.8.10 on osx 10.9 One of the required steps was adding the address of the current svn to the PATH. ...
0
votes
0answers
20 views

Need help fixing bus error in Eclipse Java? possible Pathway problem

Whats up folks, i have posted this question on other forums but got no reply, just note before you read, my terminology is not the greatest, im only studying IT this year, so my knowledge be still a ...
0
votes
1answer
25 views

Is there a way to immediately exit a hanging connection in Terminal?

I often have SSH connections through Terminal that stop responding (like if I've left it overnight) but when I try to use the dead connection Terminal doesn't respond for several minutes until: Write ...
1
vote
2answers
37 views

Escaping variable in script

I'm using script.sh in an OS X Mavericks terminal containing only the following: echo ${1} ls ${1} Now, when I call ./script.sh "/Users/me/some\ directoy\ with\ whitespace/", the echo command ...
1
vote
1answer
221 views

Why is my simple Automator script broken in latest Yosemite update (used to work)?

I had a basic Automator script I was using with a keyboard shortcut to bring up the login screen as a sort of lockscreen. It was working mostly fine until 10.10.1 (I had to manually launch from ...
0
votes
2answers
61 views

Percent character breaks Terminal

If I type the % character in the Terminal, it breaks that shell and every new shell I open until reboot: $ seq 10 | parallel -j50% "echo Hi {}" -bash: printf: `"': invalid format character Does ...
0
votes
0answers
26 views

Damaged preference file in /bin/sh

Today in Drive Genius 3, I ran the “Verify Preferences” function in Repair. It yielded this strange result: /bin/sh: xargs: command not found The only option Drive Genius gives is to remove the ...
0
votes
1answer
23 views

In bash, can test -e look for a file with a semi-variable name using *?

I have an if then looking for a certain set of files. They all start with lib, so I could either set an if then up for each one or I was hoping there's a way I can use an asterisk. Here's what I have ...
1
vote
3answers
184 views

Running a .sh file but after new PATH is not visible in shell

I am running a file ./setWLSEnv.sh which has the following output: http://pastebin.com/sSXRZd1s ...
0
votes
0answers
21 views

How do I accomplish the same task of a Bash script with an Apple script?

The following BASH script was written for a self-contained bundle, I would like to write an Apple script to accomplish the same thing, also in a self-contained bundle. How can I convert this BASH ...
0
votes
2answers
28 views

find supress permission errors

Running find command on root folder : find / -type d -wholename "prog" -print Keep seeing errors like find: ./Users/auser/Library/Preferences: Permission denied How can I supress these? If no ...
0
votes
1answer
71 views

Setting environment variables for scripts run by launchd?

I have a script that worked in the past, but seems to be having issues now (I believe it's due to Yosemite). What I had done was created an environment variable that was set to "false" and then my ...
1
vote
0answers
33 views

Running “irb” changes my zsh to bash on iTerm2

I'm running OSX 10.9.4, and my default shell is set to z shell. I was just working out my installation of Ruby and RVM and playing around with irb when I suddenly notice that my window title says ...
1
vote
1answer
41 views

Missing .Bash Files in ~/

While uninstalling/removing home-brew, node, and yeoman...I noted that I don't have a .bashrc or .bach_profile in my home directory. I only have .bash_history present. Why is this? Is this bad? If ...
0
votes
1answer
25 views

Power consumption of a bash command

I want to run a bash script on my jailbroken iPhone whenever it is being charged. Currently my script looks like this: #!/bin/bash ACpower=$(pmset -g | sed -n '2 p' | grep -o '*') if [ "$ACpower" ...
0
votes
1answer
112 views

Terminal: command overridden via shell script in /usr/local/bin not executed unless called directly

I've created a shell script wrapping ssh to change my terminal background when connecting to a server following one of the many examples on this site and stackexchange. 11:22 ~ $ echo $PATH ...
1
vote
1answer
26 views

How do I replace a symlink with the actual file?

I want to remove the symlink and instead insert the file it links to, if possible all with one command so I can have it as an "External Tool" in phpStorm.
0
votes
1answer
44 views

Running a script with assets inside automator application

So, I'm trying to write an automator application that runs a simple script. python Contents/main.py where Contents is the contents of the .app. When the script is run it is run in ~ not in the ...
1
vote
0answers
116 views

PROMPT_COMMAND='history -a; history -n' changed (broken) in Yosemite / bash 3.2.53

I need my command history to be shared across all terminal sessions and all commands available for immediate recall from any other terminal. This is the default for old school ksh shells but hasn't ...
0
votes
1answer
61 views

running a command stored in a bash variable

So I'm trying to capture the IP address of a Parallels VM guest (Win8) from the host (OS X). I thought a bash script would be good for this. The ultimate goal is to have a single command that will ...
0
votes
2answers
174 views

Launchd unloading LaunchDaemon

I have a script scheduled to run as LaunchDaemon. Script runs fine when launched manually through terminal. I have two commands sudo launchctl unload -F /Library/LaunchDaemons/com.test.plist sudo ...
0
votes
0answers
49 views

Problem with PATH after installing MySQL

I'm looking for help concerning a problem with my Terminal. After some researches on differents websites, forums, I'm not the first one in that case, but all the solutions I've tried sofar did not ...
0
votes
1answer
52 views

Getting unknown command error when trying to run a bash script

I recently had to re-install 10.9.5 (default install) and am now finding that bash scripts that run perfectly from the command line (~/Me...) no longer work using crontab. I use crontab to invoke ...
2
votes
2answers
99 views

Auto-Update Script

I'm trying to get the Macs at my workplace all updating at a specific time. To do so, I'm running a bash script from a spare Macbook running OS X Server. I have one minor and one big issue with my ...
2
votes
1answer
111 views

changes to .bash_profile causing Terminal shell to not load but keep looping with PATH settings

I was trying to make some changes with PATH (mostly add a new PATH) to my .bash_profile and the last line entered was source .bash_profile. After I saved and restarted the Terminal app, instead of ...
0
votes
1answer
168 views

OS X Terminal – Open Tab in current directory, troubles with umlauts

I run OS X 10.7.5. I am currently experiencing an issue with Terminal. I have enabled the option to open new tabs in the current working directory. However, this does not work as expected, when the ...
0
votes
1answer
157 views

Commands not found in Terminal except echo

In my terminal basic commands are not found like: mds-macbook-pro:~ ZILLURRAHMAN$ ls -bash: ls: command not found mds-macbook-pro:~ ZILLURRAHMAN$ env -bash: env: command not found mds-macbook-pro:~ ...
0
votes
0answers
121 views

Bash shell doesn't inherit $PATH set in /etc/launchd.conf

I am new mac OS X user and recently I am setting up my laptop as a work environment. That concerns environment variables setting in shell. After some search work I found several ways to set ...
0
votes
2answers
49 views

Route command to use wildcard

I have a bunch of routes to my LAN line that won't resolve through my WiFi (which is set as 1st order). sudo route add 10.999.999.999 10.888.888.888 I have a lot more but that's just a sample. This ...
1
vote
1answer
55 views

Run script before every Time Machine backup?

I would like to be able to run a bash script just before Time Machine runs, every time This script generates some content to be written on a file which needs to be backed up by TM. I have looked ...