Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 1997 19:32:57 -0500
From:      JD Thomlinson <jthom@synet.net>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   psif minor bug & fix
Message-ID:  <199705300034.TAA59926@g30.synet.net>

next in thread | raw e-mail | index | archive | help
Hi all -

This is a *very* minor bug, but since I'm a 'nix newbie it 
cost me several hours of troubleshooting.

In the file: /usr/local/libexec/psif (the *basic* ps filter).

The first statement "read first_line" uses word splitting 
with the default ISF. The subsequent "echo First_line" echos 
the split line with spaces substituted for spaces and tabs. 
The first line therefore prints incorrectly with a single space 
substituted for multiple spaces or tabs.

Putting IFS="" (null) before the read turns off the splitting. 
Apparently when the script finishes, the IFS variable goes out 
of scope and returns to the default IFS of the invoking shell.

It looks like it's fixed, but is it? Did I do good? Huh? Huh? 
Brother is there a lot to learn!

A 49 year old learning UNIX, JohnT ;-)

PS: Is anyone working on porting MOSIX to FreeBSD?

-----
"Improvement succeeded each other so rapidly, that 
machines which had never been finished were 
abandoned in the hands of their makers, because 
new improvements had superceded their utility." 

Charles Babbage 'On the Economy of Manufactures' 1832





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705300034.TAA59926>