From: matz@... (Yukihiro Matsumoto) Date: 2002-06-14T12:45:19+09:00 Subject: Re: UNIX pipes HI, In message "UNIX pipes" on 02/06/14, "David Douthitt" writes: |@snaptime = `/usr/contrib/bin/gunzip -lv #{file} | /usr/bin/sed 's/^[^ ]* [^ ]* \(... .. ..:..\).*/\1/'`.chomp |p @snaptime | |...and it should (to me, anyway) return: | |"Jun 12 13:54" | |...instead of the odd result of: | |"\001" | |What gives? That's not a returned error code, is it? `` eats your backslashes, so that it passes sed \( -> ( \) -> ) \1 -> \001 which are not what you want. Try @snaptime = `/usr/contrib/bin/gunzip -lv #{file} | /usr/bin/sed 's/^[^ ]* [^ ]* \\(... .. ..:..\\).*/\\1/'`.chomp matz.