1
vote
3answers
33 views

bash-command not found; for every command == fear i could screwed up the path

here is the output of echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin and when I gave cat /etc/paths this is the output /usr/bin /bin /usr/sbin /sbin /usr/local/bin I am ...
1
vote
1answer
69 views

How can I fix this CODESIGNING error?

After having successfully compiled bash and sh for OS X Mavericks our OS X Server's System Log is flooded every 2 or 3 seconds with: ... kernel[0]: CODESIGNING: rejected new signature for ...
1
vote
1answer
26 views

Switching between proxy and no-proxy config in .bash_profile

I have configured proxy settings (on mavericks) within $HOME/.bash_profile (purpose: to make npm, rvm, git use the corporate proxy) and the configs are as follows: git config --global http.proxy ...
0
votes
2answers
18 views

How to access a folder which name is composed of more than 1 word via shell?

I have tried with a simple command: cd Name of the Folder but it's not working, of course. I have also been searching on the web, but the methods I found are not actually working. How can I ...
2
votes
1answer
60 views

Updating and running Git through Homebrew instead of XCode

On my new 2014 Mac (OS X 10.9 Mavericks), I have just installed Git using Homebrew. In order to install Homebrew, I had to download and install XCode 5. So now, when I enter the command which git, I ...
0
votes
1answer
44 views

Mac OS X Terminal - Basic commands not found by shell [duplicate]

I've had some problems recently with terminal. The shell isn't able to execute basic commands, since they are not being found. Here's an example : -bash: ls: command not found I've been doing some ...
1
vote
1answer
30 views

Installing software on a MacBook

I'm switching from PC to a MacBook and wondered the best convention for installing new software. For example, I've downloaded the Atom IDE, unzipped the 4 files and put into the ...
4
votes
2answers
79 views

How to check the exit status of an application after using 'open' in shell

I've looked all over for this and I'm not entirely sure how to do this. I want to use a bash script to open an application using 'open' and then check the exit status of the application after it has ...
6
votes
2answers
536 views

Change *.txt to *.csv

How can I rename all *.txt in a directory to *.csv files in the terminal (Mavericks). I tried following inside the directory: mv *.txt *.csv
2
votes
2answers
36 views

Terminal window title rapidly changes when first opening

When I open a fresh terminal window, the title at the top has this format: [house icon][username]-[command]-[terminal size] The command portion of the title initially says login, then it very quickly ...
2
votes
0answers
31 views

How to make files safe so users can download and OS will not quarantine them?

I work with Axure software that generates dynamic and navigable prototypes in HTML. Once they are done I need to send a ZIP file of those HTML files to clients via e-mail or any download internal ...
1
vote
4answers
106 views

Getting my old Terminal back after uninstalling fish

Recently I got tired of the smaller kinks that the Fish Shell presented me with (undiscoverable commands etc.) so I decided I wanted to change the shell back to normal and uninstall fish. However in ...
1
vote
1answer
72 views

Why does this bash script not work as an automator service?

I know very little about bash scripting or Terminal commands, this is all very new to me so please bear with me. Original script I would like to use a script I found on littlefield.info as an ...
0
votes
0answers
52 views

Issues with Unicode symbols in some applications running in Terminal.app and iTerm2

Darwin DeoGloria 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Fresh user account. Terminal.app and iTerm2 with UTF-8 set. Accented ...
1
vote
3answers
43 views

echo works incorrectly with GeekTool

I am trying to use echo in GeekTool to print text without a newline like this: echo -n "test" When I run that command in Terminal it prints this: test In geek tool it prints this: -n test What is ...
0
votes
3answers
80 views

“Command not found” when attempting to cd in Terminal

I am getting errors trying to set up web starter kit via Terminal. I get an error trying to install the kit: $ cd web-starter-kit $ npm install returns -bash: $: command not found. How do I get this ...
0
votes
1answer
52 views

Problems With Terminal (/usr/bin)

I'm experimenting around with my computer and I realized that all the commands in the terminal that aren't bash builtins were stored in the /usr/bin. So I wanted to see (to confirm my realization) ...
0
votes
1answer
73 views

I get errors when trying to install GTK+3 on my Mac OSX 10.9 system

I'm trying to install GTK+3 on my Mac OSX 10.9 system to run a pyGObject project I've been developing in Ubuntu. It runs perfectly on Ubuntu, so I wanted to test cross-platform compatibility. I'm ...
0
votes
1answer
173 views

What does update_terminal_cwd do in the terminal of OS X

I am puzzled by it for quite some while now. In $PROMPT_COMMAND of the bash in OS X, there is a command called update_terminal_cwd. I am sure it's not a bash built in, and most likely only exists in ...
0
votes
1answer
44 views

How to download images from an xml feed using terminal?

How can I download png images from an xml feed that looks the following way? <ListBucketResult xmlns="http://url1.com"> <Name>imagesToUse</Name> <Prefix/> <Marker/> ...
0
votes
1answer
153 views

Fix Terminal error message “-bash: /etc/profile.d/rvm.sh: No such file or directory”

I am trying to remove the following Terminal error message: -bash: /etc/profile.d/rvm.sh: No such file or directory I recently uninstalled RVM (Ruby Version Manager) from my MacBook Air. The ...
3
votes
1answer
110 views

How can I define CLASSPATH variable

For a school assignment I need to add a folder to my classpath. It says that I should do this by adding a line to the file .bashrc. However, this file doesn't appear to exist in my computer. I also ...
1
vote
1answer
55 views

Trying to get Sublime Text 3 working from terminal

I am trying to get the Sublime Text to work with Git from the following tutorials http://www.sublimetext.com/docs/3/osx_command_line.html and ...
2
votes
1answer
38 views

Automatically stop a terminal script when locking MacBook Pro

I have written a bash script that I manually start when logging in onto the laptop, but I want it to stop running when I lock my laptop. This doesn't seem a very standard scenario, but I don't want ...
2
votes
1answer
33 views

Terminal sometimes scrambles initial output

I switched to iTerm 2 a while ago, but would like to fix this small problem that I have with OS X's built-in Terminal. Terminal is supposed to look like this when it first opens on my machine: ...
1
vote
1answer
62 views

Automate mobile terminal?

I have a jailbroken iPhone. I use it to reboot my router when my wifi is going slow or messing up. But I'm lazy and I was looking for a way to automate the process. I use shortcuts that mobile ...
2
votes
1answer
21 views

Date trash was last emptied bash

I'm trying to find out at what date and time the trash was last emptied. Would it be the date modified of the least recently modified file? Does moving it to the trash count as modifying it?
3
votes
3answers
131 views

Get full path of script in PATH environment variable

I was wondering if there is a built-in command in Bash (or even something OSX-specific) that would display the fully resolved path of a script that is in the current PATH environment variable. For ...
0
votes
1answer
51 views

How to prevent MacVim from inherenting .profile as if it was Bash itself?

I have this guard in my .profile: if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi if [ -f "$HOME/.bash_aliases" ]; then . ...
5
votes
2answers
386 views

Command to close terminal window

When I want to close a window I type exit : mbp-thomas in ~ ○ → exit logout [Opération terminée] Then cmd + w to close the window. Is there a way to do it with a little script like if I type ...
3
votes
0answers
57 views

Changing terminal colors for normal files when ls -G or within .bash_profile

So I followed this thread (Changing terminal color) and got all of the colors working for directories and such, except however, for normal files such as a Gemfile or .txt files or .java files or .rb ...
0
votes
1answer
28 views

Why do I need to type ./mysql even that I am in the folder? [duplicate]

So I am in a folder where mysql executable already is.. When I try mysql in terminal I get: -bash: mysql: command not found But this will work: Korays-MacBook-Pro:bin koraytugay$ ./mysql Welcome to ...
2
votes
2answers
87 views

Colors by file type in terminal (running bash)

I'm new to Apple (coming from Linux) and have been stymied in every attempt to use my .bash_profile to get my terminal to color files by their extension (a process which was a single line in my .cshrc ...
1
vote
2answers
502 views

How to list bluetooth devices from command line

I have to list all available bluetooth devices from command line. I tried to google it, but got only results like "how to turn on bluetooth from terminal". Simply: bluetooth scan Thanks for help in ...
1
vote
2answers
233 views

Shell variable PROMPT_COMMAND not working as intended?

I want my bash prompt to change depending on external conditions. Here is excerpt from the bash manual: PROMPT_COMMAND: If set, the value is executed as a command prior to issuing each primary ...
1
vote
1answer
2k views

Bash or sh cannot execute any binary files

While I am able to execute binaries, when the terminal is open, if I type: /bin/bash make or /bin/sh ls I get: /usr/bin/make: /usr/bin/make: cannot execute binary file Why is that? I am on ...
0
votes
0answers
35 views

For a bash script I want to replace a folder without changing owner and permissions

I want to replace a folder with cp -f without changing owner and permissions cp -R -f "newfolder" "oldfolder" Because I create backups of the old folder with the bash script I tried to use chmod ...
1
vote
1answer
186 views

ffmpeg working from command line in Terminal but not in an Automator shell script!

I have just compiled my own copy of ffmpeg on my system and it's located in the following path: /opt/local/bin/ffmpeg When I run the following command in Terminal.app, it runs smooth: ffmpeg -i ...
1
vote
1answer
66 views

How can I get the list of allowed users for Remote Management via Terminal?

I want to use a command line tool to get the list of allowed users for Remote Management (ARD). I was able to enable ARD using kickstart, but I'm having trouble finding how you get the information, ...
0
votes
1answer
39 views

Why is same privileged bash command giving different information from script than from command line?

I wrote a bash script to verify various configs on a system, but I am getting different results depending on whether it is run from the command line directly or from the script. Here is the command: ...
0
votes
0answers
15 views

Strange word in Terminal Bash Prompt [duplicate]

When I launch terminal I'm greeted with: Last login: Thu May 1 15:36:29 on ttys000 fib:~ nyx$ What is fib and why is it there? Will be great if help can be provided to troubleshoot this...
1
vote
4answers
73 views

Terminal: Adding logic to 'find' directories containing either [criteria A] or [criteria B]

I have inherited a vast media archive without a unifying organizational scheme. Its contents date back at least 10 years. I have been asked to find a needle in this hay stack, and I have some guesses ...
2
votes
4answers
843 views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
1
vote
2answers
111 views

OS X Terminal not recognizing any commands

I recently tried to install CoffeeScript on my mac and now am unable to use even the most basic of commands like ls, cd and so on. Something tells me that it's because the $PATH variable has changed. ...
1
vote
3answers
2k views

How do I undo “export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile”

I was trying to install homebrew, which wasn't working. It told me to do echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile. However this wasn't having any affect, and I thought maybe it ...
2
votes
3answers
149 views

Bash: Return the most recently edited file in a specified directory

For a bash script I am currently developing I want to access the name of the most recently edited file (including folders but not subdirectories) in a specified directory. How do I do this?
1
vote
1answer
126 views

Running shell commands with Automator: how to create a droplet launching an “exec” command?

I need to create a automator application that launches the following exec command, whenever a image file is dropped onto it (the exec print the image files with some printing params). exec('lpr -o ...
1
vote
1answer
72 views

Using MacPorts bash, tab completion no longer lists hidden / dot files

I used MacPorts to install bash (bash @4.3.8_0). I switched Terminal to use /opt/local/bin/bash as the command to startup. However, now when I type vim ~/.<tab><tab>, it no longer lists ...
2
votes
2answers
183 views

make it easier to call often used terminal commands

I have a java tool that I use quite often from the command line but to use it I have to type java -jar dsim.jar. I want to make it so that I can call it just by typing dsim regardless of what ...
1
vote
1answer
169 views

How do I get osascript to parse backslashes and run this command in a new Terminal window?

Here's a command that works fine when I paste it into the Mac Terminal window: echo -n -e \\033]0\;My Custom Window Title Here\\007 ; ping www.google.com In particular, it sets the Terminal's title ...