Red Hat shell scripting problem

Duane staddend001 at hawaii.rr.com
Mon Sep 10 00:53:36 PDT 2001


In a line in bash,  (t)csh or bourne shell, you can type:

	echo "Enter your choice: \c"
	read response

and the output to the screen would be:

	Enter your choice: _  

The _ being the cursor position.  It keeps it from going to the next line.  
Makes the scripts look better. There are a number of options that can be used 
with the \.  The man page has all the options.  I was running it in bash on 
BSD, bourne shell on Solaris.  It will work if I run C shell, but C shell has 
other limitations.

The man page on my system says it can be done, but when I run the code above 
I get:
	Enter your choice: \c
	-

It's got me baffled.
	
On Sunday 09 September 2001 09:20 pm, you wrote:
> I'm not sure what you mean by "supress carriage return".  Can you describe
> the behavior in greater detail?
>
> What shell are you using on BSD or Solaris?  Have you tried the same shell
> on Linux?
>
> ----- Original Message -----
> From: "Duane" <staddend001 at hawaii.rr.com>
> To: "Linux & Unix Advocates & Users" <luau at list.luau.hi.net>
> Sent: Sunday, September 09, 2001 8:39 PM
> Subject: [luau] Red Hat shell scripting problem
>
> > I have been looking around for info on this and figured I'd see what you
>
> guys
>
> > say.  I am running Red Hat 7.1  with my default shell as bash.  When I
> > run
>
> a
>
> > script with the \c (to suppress carriage return) , \n (carriage return)
> > or any other \ options, it doesn't work.  I just get the the \c (or
> > whatever) echoed to the screen.  I tried it as root with the same result.
> >  If I run
>
> it
>
> > on BSD or Solaris it works fine.  I couldn't find anything at redhat.com.
> > Has anyone else experienced this?  I thought it might be an enviornment
> > setting, but after playing around, I've changed my mind.  Any help would
>
> be
>
> > great.  All my scripts look silly right now.
> >
> > --
> > Duane Stadden
> > staddend001 at hawaii.rr.com
>
> ---
> You are currently subscribed to luau as: staddend001 at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')



More information about the LUAU mailing list