Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'I use this little shell script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I use this little shell script
Authored by: semios on Oct 20, '03 06:29:03PM
Use the instructions in the parent comment to insert the "^[" and the "^G". Or just download it here and don't bother trying to coerce vi into making funny control characters.
#!/bin/sh
# title
#
# Shane Celis <shane@gnufoo.org>

if [ $# -eq 0 ] || [ "$1" == "-h" ]; then
	echo "usage: title <string>" >&2
	echo "sets the title for the terminal window" >&2
	exit 2;
fi
title="$@";
echo -n "^[]0;$title^G"


[ Reply to This | # ]