Return Key


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Return Key
# 1  
Old 11-29-2006
Return Key

Is it possible to enter data into a read command and automatically enter, for instance

read name
echo "Andy" /r


could this work cos it doesn't seem to be working for me!
# 2  
Old 11-29-2006
something like this,

Code:
>read name
hi\\n
>echo $name
hi

>

# 3  
Old 11-29-2006
I cant seem to get it working my code is set up like this:

read ans

if [ $ans = X ]

then

echo "Thanks For Using Logit, Goodbye" $fname $lname


exit 1

else
echo "Wrong Commannd Entered"

logit

fi
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to write a shell script to automatically accept return key with out user intervention?

Hi Friends, i am creating a shell script which is accepting file name as input parameter from Java and invoking finacle service. The service will accpet text file,B2k_session id,etc and upload the text file data in finacle database. My shell script looks like this:- #! /bin/ksh... (2 Replies)
Discussion started by: vadlamudy
2 Replies

2. Shell Programming and Scripting

enter key or carriage return as input in perl

hi experts Question in perl i'm creating a script to take from user a different inputs one of them is the carriage return .. so that i want to make an if condition if the user hit enter key the user will go to previous step it something like that chomp ($input = <STDIN>); if ($input =~... (3 Replies)
Discussion started by: doubando
3 Replies

3. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

4. Shell Programming and Scripting

How to enter a return key in bash script?

Hi, I'm porting an install script from AIX to Red Hat (2.6.18-164.el5 #1 SMP) I have this script working in both AIX and HP-UX. The script is a wrapper for a Micro Focus Server Express install program. It responds to the install program questions with a here-now list. Responses includes... (14 Replies)
Discussion started by: duker61
14 Replies

5. Shell Programming and Scripting

date and time on every time pressing return key

Hi all, I have a situation here, I want that every time when i press "enter key" in bash prompt i want the date command to be executed. i have tried to make some changes in "/etc/bashrc" but no luck. Thanx in advance (1 Reply)
Discussion started by: xander
1 Replies

6. Shell Programming and Scripting

How to include RETURN KEY with Background process "&" in Shell Script

Hello All, I am a newbie in Shell script programming, and maybe you can help me with my query. I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script. The mntServer.ksh script contains: #!/bin/ksh... (1 Reply)
Discussion started by: racbern
1 Replies

7. Shell Programming and Scripting

How to identify whether the return key is pressed ??

I want my program(ksh) to execute further only if the return key is pressed. Please help. i have already tried "\n", "\r", "^M" . Thanks in advance (2 Replies)
Discussion started by: AiK
2 Replies

8. UNIX for Dummies Questions & Answers

Pressing backspace key simulates enter key

Hi, Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused: Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

9. UNIX for Dummies Questions & Answers

Behavior Return key

Hi all! Well, you might have guessed it, I am looking for a way to control the return key under Solaris 8 and using telnet connections. I notice a difference between Solaris and System V but I don't know exactly where to look for changes. The stty params are slightly different but as far as I... (2 Replies)
Discussion started by: nulnul7
2 Replies
Login or Register to Ask a Question