LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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: 29,415
Blog Entries: 55

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:45 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration