Sponsored Content
Top Forums Shell Programming and Scripting Renaming putty windows with a shell script Post 302093730 by orno on Monday 23rd of October 2006 05:48:35 AM
Old 10-23-2006
Bug Renaming putty windows with a shell script

i frequently have to open multiple putty windows to ssh into a unix server running HP-UX 11.23. Since i use some of the windows for dedicated processes i would like to rename them (the caption displayed in the titlebar) to something more convenient than the standard <Host>.<Server>.com

While researching on how to do this, I came across this site: http://www.mail-archive.com/screen-u.../msg00331.html

This works fine when I run the command from the command line, but I wanted to make a shell script so that I can just say something like 'settitle.sh This is window 1' and it would rename that particular window to "This is window 1"

I made the following script (settitle.sh) for this:

Code:
#!/bin/sh

params=$*
PROMPT_COMMAND='echo -ne "\033]0; $params \007"'

I created an alias to this script in my profile:

Code:
alias title='. $SCRIPTS/settitle.sh'

Now this is what I dont understand:
If i say
Code:
title This is window 1

the title of my window gets set accordingly

However if I say
Code:
./settitle.sh This is window 2

nothing happens Smilie

If i try calling the settitle.sh script through another script, its the same thing: nothing happens....

Now I've just started off scripting a few weeks ago so I'm not an expert or anything but this has got me stumped...

Anyone got any ideas?

Last edited by orno; 10-23-2006 at 11:02 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

copying files and Renaming them + shell script

Hi, I have a problem. I have some text files in a folder. The names can be like: emp.txt emp1.txt emp3.txt 32emp4.txt What i need is i have to copy all the files which have "emp" string in their filename to a different folder and those file names... (7 Replies)
Discussion started by: pathanjalireddy
7 Replies

2. Shell Programming and Scripting

Putty Input thru Windows

Hi anyone knows how to pass values to putty command prompt from MS windows. since i am have a shell script to get input of several lines. i dont want to type it rather than input values from some windows based application is there any way thanks in advance. (2 Replies)
Discussion started by: JACKDSOUZA
2 Replies

3. UNIX for Advanced & Expert Users

Use putty problems in windows

Hello all, I have encountered a strange question. I installed a Ubuntu 8.10 in the VMware in the XP, and use putty to connect to ubuntu. Everything is fun except I can't use the wget in putty, neither does command "sudo apt-get ***". But they are OK in the VM. Can someone help me out? Thank... (2 Replies)
Discussion started by: tpltp
2 Replies

4. Shell Programming and Scripting

Renaming file names in a shell script

I want to write a shell script that will rename all the file names to today's date attached to it.. so for example i have a file names like file1.sales.20081201.txt.c zbrs.salestxtn.20091101.txt.inn then it will rename both the files with todays date to it so the file names get changed... (1 Reply)
Discussion started by: rudoraj
1 Replies

5. UNIX for Dummies Questions & Answers

Renaming Files using Shell Script

Hi Gurus, I have some files(all ending with .out as extension). Ex: aa1.out aa2.out aa3.out I would like to append each file with the current date to the end of the file so that they should become aa1_20090504.out. So I am using rename as follows: for i in path/aa* ; do mv $i... (5 Replies)
Discussion started by: asmfloyd
5 Replies

6. Shell Programming and Scripting

Renaming multiple files with a shell script

Hey guys, I'm really new to UNIX and shell scripting in general. For my internship I need to rename a bunch of files. Specifically, I need to change the first letter of each of the files to lowercase and I have to change the endings so they all basically look like "file_cone.jpg". I know I... (4 Replies)
Discussion started by: jjzieve
4 Replies

7. Shell Programming and Scripting

renaming directories with shell script

Hi All after looking around the website and various other resources I become stuck. I'm trying to rename directories from Firstname Initial Lastname to lastname,_firstname_initial so far ive got for f in {./} do rename -n 'y/A-Z/a-z/' * rename -n 's/\ /_/g' * ... (2 Replies)
Discussion started by: harlequin
2 Replies

8. Shell Programming and Scripting

Exits from putty instead of shell script

Dear, I have written below code to initiate the log at top of my script. #Set the log file LOGFILE=<path>/<filename.log> exec > $LOGFILE 2>&1 ............... .... ... .. ............ echo -e "\n\n Script finished OK " `date "+%m/%d/%y %H:%M:%S" ` "\n\n" exit 0 the logging ends only... (14 Replies)
Discussion started by: Imran_Chennai
14 Replies

9. UNIX for Dummies Questions & Answers

startX windows application during boot.....putty connection takes the windows

Dear all i am new to linux/debian i run my application on the computer...during startup in bashrc i wrk wid dis script to invoke startx..i do this above command and it works perfectly... if && ; then startx -- -br 1>/dev/null exit 0 fi i use winscp for file transfer and putty for... (1 Reply)
Discussion started by: venkat_330
1 Replies

10. Windows & DOS: Issues & Discussions

Method to run a shell script using shortcut key in keyboard with out logging to putty

Dear All, I want to run a shell script with out logging to putty but configuring it to a keyboard short cut it windows PC. Can this be done? I want this to rename a log in a specified folder in a system Thanks (8 Replies)
Discussion started by: Chi_SL
8 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy