set PROMPT_COMMAND for putty


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting set PROMPT_COMMAND for putty
# 1  
Old 09-28-2011
set PROMPT_COMMAND for putty

Hi,
I"m trying put string below to set window title on putty into the script and cannot, whereas it works OK from command line, tried all combo with single/double quotes, nothing help, have some syntax errors, <-ne> not found, etc...
What is the magic?


Code:
bash_$ PROMPT_COMMAND='echo -ne "\033]0;#64 $@${HOSTNAME}: ${PWD}\007"'

Thanks all
T
# 2  
Old 09-28-2011
What, exactly are you trying to accomplish? Just setting your own window title while running a script?

Code:
echo -ne "\033]0;THIS IS MY FANCY WINDOW TITLE\007" ; sleep 1

If PROMPT_COMMAND is overwriting it with its own title, you'll see the title change for 1 second then change back.

Or do you want to change the title BASH shows?
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help needed with shell script to search and replace a set of strings among the set of files

Hi, I am looking for a shell script which serves the below purpose. Please find below the algorithm for the same and any help on this would be highly appreciated. 1)set of strings need to be replaced among set of files(directory may contain different types of files) 2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies

2. UNIX for Dummies Questions & Answers

One set of executables but multiple set of configuration

i don't know where to put this question hence it is here. Presently, i have X unix machines which each of them running a set of executables with various unique configurations. i would like to have run multiple set of machines the same set of executeables but each running different... (0 Replies)
Discussion started by: lchunleo
0 Replies

3. UNIX for Dummies Questions & Answers

[SOLVED] How to set a default of 200000 as scrollback size in Putty ?

Putty release : 0.61 For saved sessions , you can configure Scrollback size just once using "Lines of Scrollback" in the 'Window' menu For a non-saved session (an ad-hoc session ) , If you want a higer scrollback size for a putty session , you have to set the "Lines of Scrollback" manually... (4 Replies)
Discussion started by: kraljic
4 Replies

4. Solaris

LC_ALL & LANG are set OK, but others couldn't set locale correctly.

Hi, I have a Solaris (SunOS 5.10) installed, by default with the en_AU.UTF-8 locale. I want to change it to en_US.UTF-8 With AU, I have no issues whatsoever, so I installed the language package and now locale -a shows "en_US.UTF-8". Problem is even with LC_ALL set in etc/default/init, the... (2 Replies)
Discussion started by: asdfg
2 Replies

5. Red Hat

How to set xterm for Window Titls for PuTTy

Hi, I still cant find step by step manual how to make my putty display let say PWD in its title, read about some xterm, but where it is? Can anybody help me with this. Thx M (4 Replies)
Discussion started by: trento17
4 Replies

6. Shell Programming and Scripting

set Net:SSH:Expect timeout and set it again.

SSHing into a machine can take a few seconds, but after I'm in, the commands return quickly. I was wondering if the timeout setting can be changed once I'm logged into the machine. Does anyone know if this can be set on the fly? The problem here is, if I have to set timeout = 10, it'll take 10... (1 Reply)
Discussion started by: mrwatkin
1 Replies

7. UNIX for Dummies Questions & Answers

How to set server's ip address, router, network mask and set if it is an internal or external ip?

Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful :b: I stopped at .. :( #!/bin/sh A=`hostname -i` echo "server ip address is $A"... (4 Replies)
Discussion started by: zagaruika
4 Replies

8. Shell Programming and Scripting

set -o vi giving set: Syntax error

when trying : set -o vi getting error like- : set: Syntax error help me Double post (of sorts). Continue here. (0 Replies)
Discussion started by: RahulJoshi
0 Replies
Login or Register to Ask a Question