[fpc-pascal] fpsystem output

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Tue Jan 15 11:51:15 CET 2013


Rainer Stratmann wrote:
> When calling for example fpsystem( 'cat /proc/partitions' );
> the lines are not beginning at the 1st character of the next line
> 
> Instead of
> Line1
> Line2
> Line3
> like in the Linux shell
> 
> The output is:
> Line1
>       Line2
>           Line3
> 
> and so on
> 
> What is the reason?

You've not told us what OS etc. you're running. This is the sort of 
thing I'd expect to see if the program were running on a unix system 
that generated \n (LF) at the end of each line, but you had a 
misconfigured terminal emulator that was currently expecting CR LF. You 
could get this if the terminal emulator were on Windows, but a 
particular case on any platform is where for some reason the TE or 
console has been set to raw (or similar) mode; there's commands to sort 
this out but often the safest way is to restart the session.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list