The following question is related to the answer that was sent to this question :
I like the idea of creating my own function that opens a new terminal, so the script that Craig Walker is associated with in this question above is suitable for my needs. The script written by Mark Liyanage is here.
This is the script:
#!/bin/sh
if [ "x-x" = x"$1" ]; then
EXIT="; exit"; shift;
fi
if [[ -d "$1" ]]; then
WD=`cd "$1"; pwd`; shift;
else
WD="'`pwd`'";
fi
COMMAND="cd $WD; $@"
osascript 2>/dev/null <<EOF
tell application "Terminal"
activate
do script with command "$COMMAND $EXIT"
end tell
EOF
I made one change to the script on the linked site; I commented on a line that prints "$ COMMAND $ EXIT" to eliminate some verbosity. However, when I run the script, I still get this output
tab 1 of window id 2835
, , . , ? ( stderr /dev/null oascript, .)