The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
18 views

Deleteing Original File After Creating Another

Here is the Script I have so far: #! /bin/bash dd=$(date -v -1d '+%Y-%m-%d') for file in *.csv ; do saveName="${dd} - TF.csv" cut -d',' -f5,8 "$file" > "$saveName" done The file ...
0
votes
1answer
144 views

Rsync exclude-from not working

I have created a rsync script which has been working fine until I made recent modifications adding exclude-from clause to it. When running the script it returns the following error: rsync error: ...
1
vote
1answer
184 views

Root crontab won't save

I'm trying to add a crontab entry to my root user's crontab. I'm able to add an entry without issue to my regular user's crontab, but when I su to root user and try adding a crontab entry it does not ...
0
votes
0answers
23 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
2
votes
2answers
306 views

Does Mac OS X's bash read scripts for all users (tab-completion scripts) from /opt/local/etc/bash_completion.d path?

I stumbled upon some instructions in the book "Pro Git" It suggests: Download this file : https://github.com/git/git/blob/master/contrib/completion/git-completion.bash If you use the Bash ...
1
vote
0answers
127 views

What is multi user mode in MAC and how to boot in multi user mode in MAC Mavericks [closed]

What is multi user mode in MAC operatins system and how to boot in multi user mode in MAC Mavericks
8
votes
2answers
9k views

Why Mac OS X don't source ~/.bashrc [duplicate]

I found a lot of people figuring out why instruction similar to this : Put X to your ~/.bashrc and you can do Y don't work. It always turns out that Mac OS X's bash's startup files (or Mac's ...
2
votes
2answers
102 views

Can't open a file in sublime text using bash_rc

My bash_profile function looks like: function st() { /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /Users/ishan/workspace/nltk_engine/index.py;} However, when I do st in terminal, ...
0
votes
1answer
92 views

What is the proper way to use the cut command on ps command output

This question is related to a question I posted on rogue firefox procesess. It relates to firefox processes following image uploads that I have been having for a while. I am trying to get to the ...
2
votes
2answers
104 views

How do I change $PATH and set it to the default directory?

For some reason when I run echo $PATHI get the following directory: /Users/<home>/Library/Applications/. How do I set it back to its default location so that I don't have to run this command, ...
4
votes
1answer
6k views

Mac OS X Mavericks - add to path

I'm trying to set up a phonegap project and while trying to add a platform it outputs the following error: Error: The command "android" failed. Make sure you have the latest Android SDK installed, ...
2
votes
3answers
138 views

Behavior of login shell vs. Linux, 'sh -c'

I have a seemingly-valid command that works fine on Linux boxes but fails on OSX, and I would like to know why. sudo su - validusername sh -c 'whoami' On Linux, this will echo 'validusername' on ...
0
votes
1answer
804 views

TERMINAL ~/.profile does not contain source ~/.bashrc MAC OSX 10.9.1

terminal shows below on this stage on gerris installation page : http://gfs.sourceforge.net/wiki/index.php/Mac_OSX_Installation Note: make sure that the file ~/.profile contains the line source ...
1
vote
1answer
64 views

How to find out which terminal app (iTerm or Terminal) is running from within bash

I need to have different color schemes for each of the two terminal types I use. I can set it in the .bash_profile as mentioned here. But how can I tell it to differ depending whether its a iTerm2 or ...
3
votes
1answer
4k views

`LSOpenURLsWithRole() failed with error -1712 for the file </path/to/folder>` when I attempt `open .`

I suddenly came across this error when I attempted to do open . to open the current directory in Finder, a command that I use quite frequently: ysim:~/Downloads$ open . LSOpenURLsWithRole() failed ...
0
votes
1answer
194 views

In Terminal, when the the “cd” command is called, libwww-perl's “head” command is also executed

Currently, in Terminal, when I execute a cd command, it also executes LWP's head command. A copy of the Terminal output follows: laptop:bin user$ cd ~ Unknown option: n Usage: head [-options] ...
1
vote
2answers
82 views

Combine two bash find commands

I have two similar find commands that I basically have the same code for both once the while loop begins. I want to combine them so I only need one find to search through files and directories, ...
8
votes
2answers
194 views

Piping multiple commands

I would like to run the following command and pipe stout of both to TextEdit: pmset -g; echo; pmset -g assertions | open -f -a TextEdit This doesn't work, it only executes the latter: How?
1
vote
1answer
280 views

Remove special characters and replace space with _ from files and directories Recursively in Bash

I have a script that is giving me some problems, I know that I have to re-do it recursively but am having some trouble. The script should rename all files and folders in a given folder by removing ...
0
votes
1answer
759 views

Find files modified today, using command line (bash)

As we all know, despite being named "Finder", the Finder is virtually useless at finding files. In Mac OS X 10.6 (or any version), how can I use the command line (bash in Terminal) to find files ...
9
votes
2answers
8k views

Using terminal to get current fan speed?

I would like to view the current fan speeds of my MacBook and iMac using terminal. I've found that running spindump then cat /tmp/spindump.txt | grep "Fan speed" will show it, but that's very slow and ...
0
votes
2answers
1k views

Set the master password from terminal

I am trying to set a master password from the terminal (using a shell script). I see the passwd function and the master.passwd function, however I don't see any documentation on either of these to set ...
1
vote
1answer
530 views

Setting a firmware password

Currently trying to use a script (preferably shell) to setup the firmware password on a fresh OSX install. I obviously found this: http://osxdaily.com/2014/01/06/set-firmware-password-mac/ which ...
1
vote
1answer
748 views

Using bash/terminal to get number of battery recharge cycles

I would like to get the number of recharge cycles using bash (terminal commands). I understand the following command will display all of the battery data, but I want the cycle count on its own ioreg ...
2
votes
3answers
1k views

Find all executable files within a folder in terminal

I have a folder myfolder that contains a huge hierarchy of files/folders. How to find all executable files within this folder? On Ubuntu this works: find . -executable -type f But Mac OS X Mavericks ...
3
votes
1answer
77 views

Log software usage time on Mac OS 9 (Oct. 1999)

I'm needing to log the time a user spends inside of an application in Mac OS 9. I created a simple bash script "launcher" to do this, but then discovered OS 9 doesn't have bash installed. Here is the ...
2
votes
2answers
211 views

Terminal.app equivalent of `xterm -e 'cmd'`

With xterm (and gnome-terminal, terminator, etc), you can run the following command: $ xterm -e 'vim somefile.txt' xterm will open and run the specified program (in this case, Vim). When the ...
1
vote
1answer
169 views

Locating an app by its bundle identifier from the command line

I am looking for a way to find an app's location on the system from the command line using its bundle identifier. I can open it like this: open -b 'com.zerotier.ZeroTierOne' ... where ...
1
vote
2answers
220 views

What options does Terminal pass to bash on startup?

In the Terminal preferences, I'm able to configure the Terminal to "Open shells with:" -> "Command (complete path):" /opt/local/bin/bash. What options is the terminal passing when invoking this ...
2
votes
1answer
171 views

Bash Terminal keeps showing “No such file or directory” at startup

-bash: /Users/MarksMac/Library/Enthought/Canopy_64bit/User/bin/activate: No such file or directory Basically, how do i remove the above error? I am using a mac 10.9.1 I have tried looking up ...
2
votes
2answers
166 views

Why isn't `history -a` working?

I am working under OS X 10.9.1 (Mavericks), using Terminal, which reports that it is GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13) I noticed some weird issues where history was not ...
0
votes
0answers
57 views

Opening Terminal shows a list of ttys - unable to use

Having the latest Mavericks installed, I tried to update PATH using nano and creating a .bash_profile file. I'm not sure what happened, but now when trying to run Terminal all that shows is a list of ...
0
votes
0answers
36 views

Cannot return to EOL after leaving in Bash vi mode

In terminal, after leaving the EOL in bash in vi mode, I cannot return to it, which makes it quite annoying to delete the last character. To replicate, with blank bash_profile and inputrc, set ...
5
votes
5answers
1k views

OSX Bash for loop - issues with spaces in folder names?

I'm getting a bit confused on how to handle spaces in path names when returned in a for loop. Rationale: I'm cleaning up the permissions on folders and files that I copy over from Windows. Most of ...
1
vote
1answer
95 views

Add color to custom ls alias

I created an alias to display permissions in octet format: alias lso="ls -l | awk ' { k=0; for (i=0;i<=8;i++) k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i)); if (k) printf("%0o ",k); ...
1
vote
1answer
61 views

Mavericks - strange behavior creating simlink in root directory

I want to create a simlink called /home, that points to /Users. The command sudo ln -s Users home (executed in /) should work; at least, I've demonstrated that the syntax is correct by creating a ...
1
vote
1answer
75 views

What could be preventing my backup script from running?

I'm having trouble getting a simple backup script to run. The following script runs most of the time, but occasionally it fails entirely (without printing out any log information). Is there something ...
1
vote
2answers
582 views

Hidden login script

I have a bash shell script that runs on login. Even though I selected the "hide" checkbox in system preferences, iTerm still shows while running it. How do I completely hide it?
0
votes
0answers
9 views

How can I customise the Terminal.app prompt [duplicate]

I have been using Terminal with xterm-256color emulation. I want to set the prompt to display the current directory in colour, as I used to under Linux. I have set the PS1 environment variable, but ...
2
votes
2answers
121 views

How do I link/call an actual shell script saved within an Applescript app?

What's the correct syntax in the Applescript below to make this app run by double clicking on it rather than how it runs now by just running the Applescript in the AS script editor? The Shell script ...
1
vote
1answer
133 views

Trying to remove files listed in file with AppleScript with do shell script call

The following code is an example of what I'm using at the moment, but it keeps erroring out on me: do shell script "find /Applications -name 'Bingo.app' > /tmp/remove_files" with administrator ...
0
votes
1answer
361 views

In iTerm, why is a command shell's command not picking up things on my $PATH?

I've got a script in my ~/.bin directory that changes iTerm's background before starting an SSH session (as detailed here, script slightly modified from this version). If I start a regular login ...
0
votes
2answers
116 views

messed up .bash_profile while configuring PostgreSQL

I am quite new to Terminal use. While installing and activating a local PostgreSQL server on my MacBook Pro (OS 10.6.8) I definitely messed up my .bash_profile (probably by messing around with user / ...
1
vote
3answers
99 views

bash: Searching with ls

Is there a bash command that can be used as Spotlight or an option with ls that only prints files containing certain text? I want to be able to open Terminal and type something ls -SOMEOPTION filename ...
0
votes
1answer
53 views

install libsoup on macbook pro

I have a shell script from a open source project, when I run it in terminal, I get the following error: ./configure: line 17678: syntax error near unexpected token `soup,' ./configure: line 17678: ` ...
1
vote
1answer
124 views

What's the BSD equivalent of the linux date command for adding subtracting days/weeks/months from a given date?

I have a given date, such as 2013-10-31 and I need to accurately determine the next day (taking into account DST, leap years, leap minutes, timezones, etc). I also have now way of knowing if the date ...
0
votes
1answer
1k views

Trying to install CocoaPods using terminal getting command not found

Im trying to install CocoaPods using terminal. In their official website it is written: installing it is as easy as running the following commands in the terminal: $ [sudo] gem install cocoapods $ ...
3
votes
1answer
708 views

\Trace/BPT trap: 5 when using open from terminal

After upgrading to Maverick, I can't use the open command anymore from the terminal. Whenever I do, I get: $ open http://google.de Trace/BPT trap: 5 This is independent on the document chosen. $ ...
0
votes
1answer
106 views

SIPS: Only Resize if Image is 315x300?

I'm currently using sips --resampleHeightWidth 250 300 "S1" to resize new images in a folder but I think that it might be resizing images that were already resized.. Is there anyway to know this for ...
6
votes
4answers
15k views

OS X Mavericks bash_profile paths don't work

I need to create a new path in OS X Mavericks. To do so, I edited .bash_profile: export LC_ALL="en_US.UTF-8" export PGHOST=localhost export PATH=$PATH:/usr/local/heroku/bin export ...