Return to Snippet

Revision: 2609
at March 15, 2007 10:02 by tgunr


Updated Code
function term () {
	terms=`/bin/ls  ~/Library/Application\ Support/Terminal/|grep -v ".*~"`
	if [ $# != 0 ] ; then
		let "count=0"
		for aterm in $terms; do
			termarray[$count]=$aterm
			let "count=$count+1"
		done
		selection=$1
	else
		let "count=0"
		for aterm in $terms; do
			case "$aterm" in 
				[0-9]*)  ;;
				* )
					termarray[$count]="$aterm"
					echo "$count: ${termarray[$count]}"
					let "count=$count+1"
					;;
			esac
		done
		echo -n "Select term color: "
		read selection >/dev/null
	fi
	open -a /Applications/Utilities/Terminal.app ~/Library/Application\ Support/Terminal/${termarray[$selection]}
}

Revision: 2608
at March 14, 2007 07:11 by tgunr


Initial Code
function term () {
	terms=`/bin/ls  ~/Library/Application\ Support/Terminal/|grep -v ".*~"`
	if [ $# != 0 ] ; then
		let "count=0"
		for aterm in $terms; do
			termarray[$count]=$aterm
			let "count=$count+1"
		done
		selection=$1
	else
		let "count=0"
		for aterm in $terms; do
			case "$aterm" in 
				[0-9]*)  ;;
				* )
					termarray[$count]="$aterm"
					echo "$count: ${termarray[$count]}"
					let "count=$count+1"
					;;
			esac
		done
		echo -n "Select term color: "
		read selection >/dev/null
	fi
	open -a /Applications/Utilities/Terminal.app ~/Library/Application\ Support/Terminal/${termarray[$selection]}
}

Initial URL

                                

Initial Description

                                

Initial Title
Select terminal file

Initial Tags
Bash, osx

Initial Language
Bash