AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only

sed 1 line buffered behaviour

  • 1.  sed 1 line buffered behaviour

    Posted Fri January 16, 2015 01:20 AM

    Originally posted by: Roald_Dupuis


    Using sed for a direct stdin treatment of data, I expect that a line is treated after the enter. This is what happens when I test on CygWin or Linux but on my AIX, a second new line is needed to treat the line. I tried with the -u flag to avoid buffer latency without modification in behaviour. Is there an option or parameter to let the POSIX AIX sed work like on other OSs?

    Example:

    sed -u '=;l;s/foo/bar/'
    like my foo            (enter)
    but not the lazy dog   (enter)
    1                      (stdout)
    like my foo$           (stdout)
    like my bar            (stdout)
    

    #AIX-Forum