Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <011201c244aa$53c5db80$0f700944@ri.cox.net> From: "mstucky5" To: , References: Subject: Re: OK, I'm a newbie in CYGWIN... How to do title? Date: Thu, 15 Aug 2002 18:23:01 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 ----- Original Message ----- From: To: Sent: Tuesday, August 13, 2002 6:12 PM Subject: OK, I'm a newbie in CYGWIN... How to do title? > I promise, I checked the archives and docs and don't see anything on > this... > > Can someone share how I perform the equivalent of the NT 'title' > command on a CYGWIN window?? I've got 4-6 CYGWIN windows open - each > tailing a certain log file. Only problem is its not obvious which > window is which log file! What I need is to do something like: > $title "Logfile1" > tail -f logfile1.log > > Hey, while I've got your attention - one more question. Does anyone > know where I can download (or compile) a version of sendtcp to run > under NT (Sorry, can't run under CYGWIN, must run under NT scripts). > > THANKS! > Bruce. Here's a little routine that I found somewhere years ago... Just compile it as gcc -o title title.c and put "title.exe" in your path... It works for me whether I'm in a "standard bash console" window or in an "rxvt" window. --Mark mstucky5 AT cox DOT net ------------------------ title.c ----------------------- #include /* * This program takes the input string and puts it into the * the xterm title. If you change the value of the first * number in the printf statement, you can determine where * the string will go. You can use either 0, 1, or 2. 0 * puts it in the title of the xterm; 1 puts it into the * the icon name, and 2 does both. */ main(argc, argv) int argc; char *argv[]; { char buff[512]; argv++; argc--; buff[0] = '\0'; while (argc--) { strcat( buff, *argv++ ); strcat( buff, " " ); } buff[strlen(buff)-1] = '\0'; printf( "%c]0;%s%c", (char)27, buff, (char)7 ); fflush(stdout); } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/