question for "echo"


 
Thread Tools Search this Thread
Operating Systems Solaris question for "echo"
# 1  
Old 10-12-2004
Tools question for "echo"

what is the mean: echo -n "^[]0;!*^G"
thanks

Last edited by chris_chang; 10-12-2004 at 02:56 PM..
# 2  
Old 10-14-2004
Not all shells support the -n option with echo. Under bash a -n echos content without adding a newline. For instance:

bash-2.03$ echo -n hello
hellobash-2.03$
bash-2.03$ echo hello
hello

As for the content of the echo, I'm not sure. What context did you find the command in?

Cheers,

Keith
# 3  
Old 10-15-2004
Re: question for "echo"

Quote:
Originally posted by chris_chang
what is the mean: echo -n "^[]0;!*^G"
thanks
That'll set the title of an xterm (or other compliant) terminal window when used in a graphical environment.

I use a similar echo in a script to do this.

If you typed, for example
echo -n "^[]0;Look ma^G"
Then the title would be "Look ma".

Remember that ^[ is produced by typing Ctrl-V Esc
^G is Ctrl-V Ctrl-G

Cheers
ZB
# 4  
Old 10-17-2004
Question thanks very much!

thanks very much, but i cant understand it clearly. Can you explain the detail of the parameters. like "Control+v" "[]"......etc.
thanks very much.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Basic question on "echo"

what happens when I echo asterisk? Please don't hijack other peoples' thread; post our own new one as required by forum rules! (5 Replies)
Discussion started by: ithenr00
5 Replies

2. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

3. AIX

echo $varibla | mail -s "subject" "xxx@xxx.com" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "xxx@xxx.com" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

4. Shell Programming and Scripting

"Simple" echo/reading variable question...

Hello, I have a simple(I think) question! Although simple, I have been unable to resolve it, so I hope someone can help! OK, here it is: 1)I have an awk script that prints something, such as: awk '{print $2}' a > x so x might hold the value of say '10' 2)Now, I just want to check to see if... (4 Replies)
Discussion started by: astropi
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

With that logic this echoes "echo". Question about echo!

echo `echo ` doesn't echoes anything. And it's logic. But echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo" (too much echoing :P):o (2 Replies)
Discussion started by: hakermania
2 Replies

7. Shell Programming and Scripting

Difference between using "echo" builtin and /bin/echo

So in my shell i execute: { while true; do echo string; sleep 1; done } | read line This waits one second and returns. But { while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly. I have tried this in bash as well as zsh,... (2 Replies)
Discussion started by: ulidtko
2 Replies

8. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

9. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

10. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies
Login or Register to Ask a Question