Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 06-02-2009
Member
 
Join Date: Jan 2009
Posts: 34
Bash Script, read without new line

Hello,

Is it possible to use the read without that attachment is made to return.

For example:
Code:
 #! / bin / bash 

  echo "Enter your age:" 
  read age
Should output:

Code:
server $. / script 
Enter your age: 
<saisie ici>
and I want this:
Code:
server $. / script 
Enter your age: <saisie ici>
Is this something possible, that I make as an alternative?
Reply With Quote
  #2  
Old 06-02-2009
Member
 
Join Date: Dec 2008
Posts: 50
Re: Bash Script, read without new line

Good evening,

It is not read that puts a newline before the entry is echo, which is one after its release. You can use it (nicely) not to save with the-n option:

Code:
echo-n "Enter your age:" 
  read age
Reply With Quote
  #3  
Old 06-02-2009
Member
 
Join Date: Jan 2009
Posts: 34
Re: Bash Script, read without new line

That's perfect thank you very much
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Bash Script, read without new line"
Thread Thread Starter Forum Replies Last Post
Bash script needs to e-mail output Kim|ball Technology & Internet 4 27-05-2011 10:19 AM
How to create CGI script in bash? Mulan Software Development 5 01-09-2010 08:19 PM
Create bash script for ftp teenQ Operating Systems 4 04-03-2010 07:37 PM
Bash script if then else help Unix'EM Software Development 3 18-08-2009 06:34 PM
Create a bash script for sftp Xubuntu_user Operating Systems 3 06-08-2009 09:30 PM


All times are GMT +5.5. The time now is 12:47 AM.