Summary:Bourne shell question

From: Larry Chin (
Date: Tue Oct 04 1994 - 19:33:19 CDT

                        ORIGINAL QUESTION

I am attempting to reassign the value of a variable in the following such
that the original variable has more characters added to the initial value.

For example:
SECOND_STRING="how are you?"

Of course that does not work.

Basically I would like to reassign $OUTPUT_STRING string to read:

        how are you ?

Would some kind Bourne shell guru tell me how this is done or if it is
even possible ?


As it turns out I could have avoided a posting if I had been using the right
version of echo. The /usr/5bin/echo does what I want, as opposed to the
/usr/bin/echo, as the form I was using above would have worked with the echo
in 5bin. Under System V unix ( like Solaris ) the echo is the echo that
will interpret newlines instead of eating them.

Special thanks to Jim Rodgers who pointed out that the problem really is
not with echo per se but rather with the IFS variable set in the Bourne
shell by default to include spaces, tabs and newlines, the latter being the
thing giving me the problem.

Tue Oct 4 07:03:04 EDT 1994
Larry Chin {} System/Network Administrator
CCH Canadian Ltd. (416) 441-4001 ext. 349

With a rubber duck, one's never alone.
                -- "The Hitchhiker's Guide to the Galaxy"

Thanks to:
charest@CANR.Hydro.Qc.CA (Claude Charest)
etnibsd! (Steve Harris) (David Burwell (7929)) (Mike Wagner) (Systems_Group) (James Coby) (Tim Evans)
Ian MacPhedran <>
scowles@scheffer.Stanford.EDU (S. Cowles) (William T. Reckas)
Steve Kite <>! (Randy Talsma)
Simon Boddy <>
Christopher Neufeld <>
Guy Polis <>
Michael Ryan <> (Donald McLachlan)
John Warren <>
david@srv.PacBell.COM (David St. Pierre) (George Pallas)
Robert Sargent <sargent@SGT.COM>
Nate Itkin <> (John Justin Hough)
"Mark E. Almeida" <mealmei@kn.PacBell.COM>
"Henry Katz" <> (Peter Samuel) (Scott McBain) (Dan Transue)
Torsten Metzner <> (Trevor Morrison)
rauthenberg@HHI.DE (Stefan Rauthenberg) (Steve_Kilbane) (Garry Perratt) (Glenn Satchell - Uniq Professional Services)
Jim Rogers <>
Gregory Bond <> (David W. Tamkin) (Brett Newton-Palmer(Sun Admin))
thi (san antonio-101-237 is FASTER than wolfe-237!) <>
Lenny Turetsky <>

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:11 CDT