Results 1 to 3 of 3

Thread: Bash Script, read without new line

  1. #1
    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?

  2. #2
    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

  3. #3
    Join Date
    Jan 2009
    Posts
    34

    Re: Bash Script, read without new line

    That's perfect thank you very much

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,300,581.98255 seconds with 17 queries