1
vote
1answer
29 views

How to generate a signature with a launchd plist? [closed]

Is it possible to implement the following shell script completely as a launchd plist to generate a signature with timestamp in the StandardErrorPath / StandardErrorPath files? #!/bin/sh echo "Hi, ...
0
votes
1answer
145 views

automatically start and and selectively stop multiple instances of couchdb on osx

I have successfully installed couchdb via homebrew: % brew install couchdb ...and invoked mutiple instances as directed here: % OLD=/usr/local % NEW=/tmp/couchdb % mkdir -p $NEW/etc/couchdb/ % ...
-2
votes
1answer
189 views

sh dev/null Permission denied apache

I am using Mac osx Mountain Lion for development. I am trying to execute a shell command in php using the 'exec' function. At the end of my command I am putting the output to > /dev/null 2>dev/null ...
4
votes
2answers
303 views

How do I get the exit code of a process that's piped to tee?

I have bash code like this (Mac OS X): foo.sh | tee foo.log echo $? The problem is that $? contains the exit code of tee and not the exit code of foo.sh. How do I get the exit code of foo.sh?
2
votes
1answer
172 views

Launch Citrix session from command line

Work has a Citrix server. My workstation is OS X 10.6.8. I noticed yesterday that if I have download an .ica file to disk I can launch it from the command line ... open agljava.ica This is ...
2
votes
2answers
59 views

How do I detect the version of find on OSX

I need to detect which version of the find command is used from a shell script. GNU find supports the --version argument but the find command on OSX apparently does not support that. Is there a way to ...
1
vote
3answers
525 views

Server Bash Line Wrapping Over Text & In Wrong Place

This is quite a hard problem to explain, when connecting to one of my servers using the bash shell, under any user the line wrapping is broken and has all sorts of problems. Once of which I detail in ...
1
vote
3answers
566 views

sync local OSX with remote linux server using ftp via shell script

I would like to sync a local folder on my Mac to a remote ftp server. I only want to upload files changed since last sync. I would also like to download new and modified files from the server. Is ...
0
votes
1answer
237 views

Mac terminal unix questions. Trying to install showoff.io

I installed the gem according to the instructions at showoff.io, but when I try to run show 8888 it doesn't work and I get -bash: show: command not found In their faq, they mention running gem ...
2
votes
1answer
826 views

Mount EncFS volume on Mac OS X works from user account but fails with root using su

I'm trying to automatically mount an EncFS volume by using login/logout hook scripts on Mac OS X. The scripts are run as root and automatically run user defined hooks as the user logging in or out. ...
2
votes
2answers
127 views

Safely deleting all files of a given name

On Mac OS X, .DS_Store files seem to contain custom view settings for the directory when it is viewed in Finder (file manager GUI). I want every directory to use my default view settings. Is this ...
2
votes
3answers
759 views

What profile is my current shell using?

Is there a way to find out which profile my shell is currently using? I can't seem to track it down, or at least it's not in any of the usual places. I'm using OS X, but I assume that it would be the ...
5
votes
2answers
3k views

How can I retrieve the absolute filename in a shell script on Mac OS X?

I'd like to retrieve the absolute file name of the script file that's currently executed. Links should be resolved, too. On Linux, this seems to be done like this: $(readlink -mn "$0") but ...