The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's manas6 UNIX for Dummies Questions & Answers 0 06-05-2008 06:44 AM
cp and rm return non zero value latitude High Level Programming 7 08-26-2007 08:04 AM
FTP return value Shaz UNIX for Advanced & Expert Users 7 06-11-2003 04:09 PM
the return value $? gusla Shell Programming and Scripting 3 12-08-2002 08:30 PM
Return value raphael.schwend Shell Programming and Scripting 1 05-03-2002 02:43 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-29-2006
chapmana chapmana is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 23
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 (permalink)  
Old 11-29-2006
matrixmadhan matrixmadhan is online now Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,952
something like this,

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

>
  #3 (permalink)  
Old 11-29-2006
chapmana chapmana is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 23
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0