Weird in Shell Prompt


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Weird in Shell Prompt
# 1  
Old 01-30-2008
Weird in Shell Prompt

Hi,

I saw something in weird in Shell prompt.
I did the following steps

1) Typed ls -l and pressed ESC without entering
2) Typed "v" (please notice that I did not type "i" after "v"), which opened vi editor
3) I see the "ls -l" command that I typed in shell prompt
4) Without modifying anything or changing anything, I quit the vi editor
5) All I could see the list of files - without typing the command.

Can anyone explain about this weird behaviour.
# 2  
Old 01-30-2008
ESC v creates a special character. The shell or even app you use to connect will interpret this as it pleases and may do all kinds of things. It probably dumped the contents of your cut-buffer into the shell.
# 3  
Old 01-30-2008
It acts only if there is/are some character(s) at the shell prompt.
I tried without typing any command or anything at the shell prompt then tried to do the same (typing ESC and "v") but it did not act like before.
If it dumps the cut-buffer into the shell then why didn't it do the samething when there are no characters at the shell prompt when I pressed ESC and "v"
# 4  
Old 01-30-2008
In that case, it must be either some other function of the app you use to connect. Either that of a shell function but it's not one I've seen before in bash, sh or csh.
I wonder if it's just the app sending an the same escape char to the shell as normally used for command completion (eg csh ESC-ESC etc)
# 5  
Old 01-31-2008
I use Ksh and I have tried it in the following applications that connects to Unix.
1) Putty 2) Attachmate Reflection 3) HummingBird 4) MSDoS (cmd) using telnet

Above application, I have seen the same behavior. Probably its not application. Its something with Shell
# 6  
Old 01-31-2008
That is not strange behavior at all if you have "set -o vi" in your profile. Hitting escape at the command line puts you in line command vi mode, so you can edit your command before executing it; hitting vi brings up the full vi editor.
# 7  
Old 01-31-2008
Thanks System Shock.
Thanks Smiling Dragon for your efforts and also helping me in my earlier issues.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Shell Scripting (prompt off)

Dear all experts, I have a script written to compress a list of files, during compressing, some of the files are having same name. When the compressing started, the same name file will be prompted with message whether to overwrite the old file. I need to enter "y" to continue. Is there any way I... (7 Replies)
Discussion started by: kwliew999
7 Replies

2. Shell Programming and Scripting

Weird Exit Status of shell script

I have a script named check which will read the content of a file and check wether those files exist in the current directory. If so it will have the exit status of 0, otherwise it will have 1. check script: #!/bin/bash if ; then #Check there is enough command line parameters. exit 1... (2 Replies)
Discussion started by: Ray Sun
2 Replies

3. Shell Programming and Scripting

share a shell script which can replace weird characters in directory or file name

I just finish the shell script . This shell can replace weird characters (such as #$%^@!'"...) in file or directory name by "_" I spent long time on replacing apostrophe in file/directory name added: 2012-03-14 the 124th line (/usr/bin/perl -i -e "s#\'#\\'#g" /tmp/rpdir_level$i.tmp) is... (5 Replies)
Discussion started by: begonia
5 Replies

4. Shell Programming and Scripting

Weird problem in my shell script,please help me!!!

sqlLogftp_mov=$LOGDIR/logftp_mov_$mydate.log sqlplus -s $ORAUSER << EOF > $sqlLogftp_mov SET SERVEROUT ON @/$SCRIPTDIR/rep_comm_ext_tbl_load.sql EOF retorno=0 cnt=`grep -q 'ORA-' $sqlLogftp_mov | wc -l` if ; then retorno=1 echo 'Failure' sendEmailFalha exit 1 fi if ; then echo... (8 Replies)
Discussion started by: shyamaladevi
8 Replies

5. AIX

weird korn shell script

here is the one of the scripts: script1.kshfunction haha { print "calling haha" exit } script2.ksh. script1.ksh haha | tee -a /dev/null print "i am script 2" after launching the script2, the result: --------------------------------------------- calling haha i am script 2 ... (6 Replies)
Discussion started by: getter
6 Replies

6. Shell Programming and Scripting

Changing the shell prompt

Hi, I want to change the shell prompt, using the cd command. I have a shell prompt like this - p78-mfx(dgaw1078/9781)$ Now i do this - p78-mfx(dgaw1078/9781)$ cd log4j here the shell prompt should change like this - p78-mfx(dgaw1078/9781)log4j$ (6 Replies)
Discussion started by: arunkumarmc
6 Replies

7. UNIX for Dummies Questions & Answers

How to get rid of all the weird characters and color on bash shell

Does anyone of you know how to turn off color and weird characters on bash shell when using the command "script"? Everytime users on my server used that command to record their script, they either couldn't print it because lp kept giving the "unknown format character" messages or the print paper... (1 Reply)
Discussion started by: Micz
1 Replies

8. UNIX for Dummies Questions & Answers

shell specific prompt

currently, I set my prompt in my .cshrc file as: set prompt = "%B%h %m %P %/ \n% " I have to use certain shells for some specific tasks and would like to set different prompts depending on the type of shell that I am using. Any advice? Thanks (3 Replies)
Discussion started by: dranNfly
3 Replies

9. UNIX for Dummies Questions & Answers

prompt in sh shell

Hi, I´m using SCO Unix 5.0.5 and I want to configure de variable PS1, so when I type the command: cd /etc/ the prompt shows /etc/_> Is that possible with sh shell? I´ll appreciate your help. Thanks, a Happy New Year! (1 Reply)
Discussion started by: diegoe
1 Replies

10. UNIX for Dummies Questions & Answers

No shell prompt?

When I login to a specific machine (running Solaris 2.8; actually serveral machines behave this way), with a known good account, I don't get any shell prompt, and no screen responses to various commands such as ID and PWD. Any ideas on what is causing this, and how to change this behavior? (2 Replies)
Discussion started by: Mufasa
2 Replies
Login or Register to Ask a Question