The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
74 views

Homebrew won't link git

I am trying to enable autocomplete for git on my mac (currently running El Capitan) but I am having troubles with Homebrew. So far, I have installed bash-completion and added the lines in my ...
0
votes
0answers
17 views

How to generate pdf with MS WORD 2011 from Command line?

Is there a way to call MS Word 2011 from the command line to generate pdf from DOCX or PPTX?
1
vote
0answers
212 views

OS X El Capitan bash shell not working in Terminal

I have a weird issue with my bash shell in OS X El Capitan. I was messing around with my .bashrc file today, and now when I open my terminal I see nothing out of the ordinary (no messages, just the ...
0
votes
1answer
13 views

Bash looping directories

My simple task is to create within the workdir up to max separate dirs copy within it some files from the template dir (so every new dir is replicas and the difference only within it names defined ...
0
votes
0answers
47 views

Remove All Illegal Characters from All Filenames in a Given Folder and subfolders

I Know this was was basically answered on the net and using automator with the shell script (Sanitize Filenames) works great, but I need it to also do all subfolders as well. And if possible trim the ...
1
vote
0answers
38 views

trim Mac files to move to Windows

I have a large number of Mac files that I need to remove illegal characters that Windows will not like and to shorten the file names while preserving the extension. I have found a Bash script that ...
0
votes
1answer
35 views

How to display an image above the needed window in needed position?

In Linux, I have bash script, which uses conky (for display image above windows in needed position of monitor) and xdotool (for check if needed window in focus, and if it is, then launch conky). So, ...
2
votes
2answers
53 views

.bash_profile not updating until open new Terminal window

I am trying to create a Terminal command. I have created this so far: cd ~/ && touch .bash_profile && echo "" >> .bash_profile && echo "alias sendtext=\"osascript -e 'on ...
0
votes
0answers
14 views

“Display Notification” stuck in loop in Bash script

Is there any way I can fire a banner notification once through a bash script? I'm trying to modify this BitBar plugin to be a little fancier: #!/bin/sh # <bitbar.title>Gmail ...
1
vote
1answer
39 views

Remove characters preceding the second underscore in file names

I have a bunch of files and I would like to remove all characters preceding the second underscore in the file names. An example is shown below. How do I do this using bash commands? [From] ...
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
1
vote
1answer
61 views

iTerm2 does not show username, machine name, time

On my new mac machine, I could not do autocomplete for Git when I hit Tab. So I thought to modify the terminal and found certain things on this link. I may have messed when I installed iTerm2, ...
3
votes
1answer
140 views

Launchd script to mount volume on boot

I have a script monta.sh to mount an external volume: #!bin/sh mkdir -p /Volumes/remvol mount_smbfs //user:password@server/folder /Volumes/remvol Then I have a com.jo.monta.plist to launch the ...
3
votes
1answer
42 views

Recognise command and colour it on the terminal?

I was wondering if it's possible to colour a recognised command in real time while typing and/or when switching to previous commands using the arrows. For example, if I start typing gre, it should ...
1
vote
1answer
61 views

Setting Terminal tab names in OS X and using vim

I regularly ssh into a Linux cluster from an OS X (El Capitan) Terminal, sometimes with multiple Terminal tabs. I use bash and vim. I'd like to do the following: while ssh'd, set the Terminal tab ...
0
votes
1answer
58 views

How to grep with filename highlighted in one color, and the match highlighted in another color?

On the Mac, I can't seem to use grep and have the filename highlighted (or in) a certain color, and have the matching string in a different color. Is there an easy way?
0
votes
0answers
34 views

OSX handling of USB Drives and Permissions - need clarification/explanation

I'm new to the site, and well, new to MACs. I have an image (dual boot yosemite and win7) on some old iMACs, late 2009s. When I deploy this image, sometimes my bootmenu disappears and I have to ...
0
votes
1answer
181 views

Run script when new user logon the first time

I want to run a couple of .sh scripts when the user first login after user creation to set the correct settings. I know there is a folder (/Library/StartupItems) that let you place script for running ...
1
vote
1answer
78 views

Ssh app on iPad runs bash script

ServerAuditor is a free iPad app that allows ssh to a server. I am trying to copy my public key to a server to allow password less login. On a pc this is easy- Generate the rsa key open terminal and ...
1
vote
1answer
61 views

Setting anacron on Mac - Shell Scripting

I set cron to run script every day using env EDITOR=nano crontab -e where I wrote something like this @daily path/to/sript.script. Now I want to use anacron to be sure that script is going to be run ...
0
votes
0answers
41 views

grep doesn't work on big files on OS X 10.10

grep works on OS X 10.6, detecting string in a big binary file. It still works on OS X 10.10 on a small file. On OS X 10.10: $ grep -bao string small_file offset : string ... $ grep -c string ...
0
votes
2answers
59 views

How to check which files have been copied to the main hard drive and which ones have not been copied?

I formatted my MacBook main drive some months ago and, in order to not lose data, I created a .dmg image of the hard drive before the formatting procedure and saved it to an external device. Then, ...
1
vote
1answer
138 views

Install automator service via command line

I would like to automate my Mac installation flow for services. The following is my script: #!/bin/sh rm -rf ./tempWorkflows mkdir tempWorkflows for filename in ./*.workflow; do cp -R "$filename" ...
2
votes
1answer
40 views

is a directory error in bash script

I have very limited knowledge of bash scripting, and I haven't been able to figure out what I'm doing wrong. So I apologize if there's an extremely simple solution that I've overlooked. I'm trying to ...
3
votes
1answer
62 views

How to differentiate between Terminal scripted launch and manual launch for .bash_profile settings

I have some .bash_profile settings that restore my last working directory every time I log in to my shell. However, I also use a program that opens a terminal window in the current directory open in ...
0
votes
1answer
41 views

How do I reload an OS X “bash” user-environment

I think that I want to ask How do I reload an OS X bash user-environment But damnit Jim ; I'm a software engineer not a sysadmin The Goal I want Jenkins started as a Daemon on El Capitan I want ...
0
votes
1answer
20 views

How to configure a proxy in a new network location using Terminal.app

I'm writing a bash script, which will create new network location and configure it. The question is - how to add proxy settings to specific network location using terminal or bash script? P.S. I'm ...
1
vote
3answers
49 views

Missing bash prompt

My bash prompt is missing as shown on the image. I'm not even sure how to open the .bash_profile since dot files are hidden in the finder. I restarted the machine to no avail.
0
votes
2answers
121 views

terminal: how do i pipe the results of grep to open a file

I'd like to grep and open a file in just one terminal command. Suppose I'm in this directory: $ ls 1.txt 2.txt 3.txt 4.txt 5.txt and I want to open 3.txt I thought I could do ls | grep 3 ...
0
votes
1answer
44 views

Path not being honored?

I have the following in my .bash_profile: $ cat ~/.bash_profile # Prompt export PS1="\h:\W$ " # Standard path export PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin: ...
0
votes
1answer
51 views

Terminal: “Invalid Argument: dirname” (El Capitan)

I noticed the issue when I first went to run defaults write com.apple.finder AppleShowAllFiles YES in OS X Terminal (10.11.2) but this was returned bash: /usr/bin/defaults: Invalid argument I'm ...
0
votes
1answer
26 views

How to trigger a bash script from right click in Safari on a particular URL?

is it possible when I'm in Safari and have link (URL) to trigger a bach script with an right mouse option? The bach script should be run with this format: bash scriptname.sh -parameter -parameter ...
2
votes
2answers
167 views

Cannot kill process shown in parenthesis

I started a rather long dd command that I would like to stop. ps shows: $ ps PID TTY TIME CMD 2006 ttys002 0:00.00 (dd) The dd process is shown in parenthesis without the argument. ...
1
vote
0answers
61 views

OS X (El Capitan) Terminal Fn-Up and Fn-Down stop working as Page Up and Page Down

I've identified a strange "state" my Terminal program seems to get into. It doesn't happen on all tabs -- right now, one tap can Page Up/Down properly, and another one can't. When I open a new ...
1
vote
1answer
79 views

sudo and some other system commands not working with platypus

I am making a shell script that works great on its own, but does not work correctly when packaged with Platypus. It does not want to execute sudo, and a few other system commands. Are there any work ...
0
votes
2answers
154 views

How does bash choose default shell

I am running El Capitan 10.11.3 with bash version 3.x so I decided to update bash via: brew install bash Brew places the new bash under /usr/local/Cellar/bash: brew info bash bash: stable 4.3.42 ...
0
votes
0answers
93 views

Uninstall old CMake and its implications

Currently I'm setting up a user account on a Mac Mini that's been used before by others. I found a pretty old version of CMake installed in /usr/local/bin - a pretty default installation path. I ...
0
votes
2answers
43 views

Help running what seems to be a directory in Terminal?

I'm trying to export my Skype chat history with this: https://github.com/Temptin/SkypeExport After I'm in the downloads directory in Terminal, typing in (with my skype username substituted in) ...
0
votes
1answer
100 views

Making Terminal bash auto-complete stop at ambiguous character and display all possible options

The behavior I see happening is that when I type something partially and hit TAB, if there are multiple files/commands that match what I had typed in, only the first one is displayed. Further TAB hits ...
0
votes
2answers
16 views

Listing/Moving certain files

My current path is /Users/UserName/Downloads/Downloaded_Path. In Downloaded_Path Folder i have multiple folders like F1, F2 etc and each folder contain rar part-files from rar to r99. What I want to ...
0
votes
0answers
42 views

Schedule executing tasks based on bash scripts using CronniX

I'm still quite new you Mac and OS X but do have some background about other UNIX based systems, so please excuse for any misunderstandings. My goal is to implement a function that executes certain ...
0
votes
1answer
33 views

How to get local directory names into terminal window titles?

The title of my terminal window is: Terminal -- bash -- 130x39 This is how I see them listed in Terminal->Window and it is very hard to know which one is which. When I use multiple terminals, the ...
0
votes
2answers
95 views

Issue with Automator and bash script

I'm making an automator service, and the first part takes files and RARs them using a bash script So in Automator, I have a Get Specified Finder Items action to test the workflow, and then the bash ...
0
votes
0answers
21 views

Saving space by hard-linking duplicates

I am looking for tool, script etc to hard link (or something equivalent) files with the purpose of saving space. (Going through files, finding duplicates and hard-linking them in). Will also then ...
0
votes
0answers
59 views

Is there a command or script in mac OS X to set the creation date to match the modification date?

Somehow, the creation date of all the photos on my USB drive has been updated to a recent date, but the modification date remains untouched. So any photo app thinks the photos were just taken recently ...
2
votes
1answer
151 views

Is it possible to open a Private Browser window in Safari using Terminal.app?

I'm trying to open a Private Browser window in Safari using Terminal. I could open Safari using open command and this way, open /Applications/Safari.app/Contents/MacOS/Safari but I couldn't open a ...
2
votes
2answers
78 views

Why I am unable to switch bash to the one installed by homebrew?

I'm trying to update bash to version 4.x. I did brew upgrade, then brew update, then brew install bash. I ran sudo bash -c "echo /usr/local/bin/bash >> /etc/shells" and sudo bash -c "echo ...
1
vote
0answers
29 views

Getting bash-3.2 everytime I “su”

Whenever I su, PS1 changes to \s-\v\$. Why is that? Tried setting it, but it still changes when I su again, or exit the terminal. What to do?
0
votes
1answer
72 views

Is $PATH just a file with a list (in order of preference) of directories?

I'm having trouble understanding exactly how $PATH works? I am on a Mac.. If I install Python with Homebrew, it will install Python into the /opt/local/bin directory. Now assuming Homebrew didn't ...
3
votes
2answers
250 views

I deleted .bash_history, now history isn't saved anymore (although I re-created it)

I have freshly installed a new copy of El Capitan. I accidently deleted .bash_history, so I just did a touch .bash_history again, hoping this would solve the problem of my bash history not being ...