LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-25-2002, 05:51 PM   #1
s&j
LQ Newbie
 
Registered: Jun 2002
Posts: 6

Rep: Reputation: 0
Question New to Scripting question


I have this script:

#!/bin/bash
echo -n "Type a line:"
read input
echo "You entered" $input

A sample run for the above script:
Type a line: linux is great !!
You entered linux is great !!

The problem is that the read command ignores all the tab characters that I enter. Is there a way to accept and display the
used input exactly the way it has been entered ?
 
Old 06-25-2002, 05:54 PM   #2
s&j
LQ Newbie
 
Registered: Jun 2002
Posts: 6

Original Poster
Rep: Reputation: 0
Unfortunately the earlier post did not show the tab characters that were present when I typed "linux is great". There were a few tabs before the word linux.
Sorry if the earlier post was confusing.
Thanks.
 
Old 06-25-2002, 08:27 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,280
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
echo "You entered $input"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
scripting question... Basslord1124 Linux - Networking 2 11-09-2005 05:52 AM
Scripting question mithereal Linux - General 2 09-21-2005 02:02 AM
Scripting question msandford Linux - Newbie 4 09-05-2005 10:23 AM
scripting question gearoid Programming 3 05-26-2004 02:43 PM
Scripting question glock19 Linux - Software 2 09-05-2003 12:45 AM


All times are GMT -5. The time now is 03:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration