Page 1 of 1

how to print in next line

Posted: Tue Jan 24, 2006 5:17 am
by sudhakar_viswa
Hi everybody,


I have to pass the data to unix.

"hello world" is my input
In unix it should store as hello in one line and world should store in next line

Thx,

Posted: Tue Jan 24, 2006 5:19 am
by ArndW
Add a line feed (Char(15)) to your derivation to add a line break.

Posted: Tue Jan 24, 2006 5:27 am
by sudhakar_viswa
Hi Arnd,

Thanx for your reply.But it is placing ^o between hello and world.That means hello ^oworld.it is not displaying in new line

Posted: Tue Jan 24, 2006 5:30 am
by loveojha2
Char(10) is the linefeed character, try it.

its char(10)

Posted: Tue Jan 24, 2006 5:31 am
by sekr
its a char(10)

example :-

col1:char(10):"sam"
in unix o/p is seen like

col1<value>
sam

Posted: Tue Jan 24, 2006 5:31 am
by ArndW
My misteak <sic>; the UNIX LF is CHAR(10)

Posted: Tue Jan 24, 2006 6:52 am
by kcshankar
Hi sudhakar,
Here is an alternative.
Ereplace(in.Source," ",Char(10))


regards
kcs

Posted: Tue Jan 24, 2006 4:33 pm
by ray.wurlod
Convert() is more efficient than Ereplace() for single character substitution.

You can gain further efficiency by initializing a stage variable (call it svLF) to Char(10) and not providing a derivation for it for each row. This means that the Char(10) function is evaluated only once.

Code: Select all

Convert(" ", svLF, InLink.TheString)

Posted: Wed Jan 25, 2006 4:42 am
by sudhakar_viswa
Thanks to everybody.The problem is solved.i.e char(10)