This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
---- extPart_ST_17_54_30_Thursday_June_13_2002_10939
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
I thought I could do:
@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?
I tried "system()" but it doesn't return a string the way I want, and it didn't work anyway.
What's the accepted way to use a UNIX pipe? I wound up using Ruby commandsnstead of sed...
---- extPart_ST_17_54_30_Thursday_June_13_2002_10939
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4912.300" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 8pt Microsoft Sans Serif; MARGIN-LEFT: 2px">
<DIV><FONT size=2>I thought I could do:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>@snaptime = `/usr/contrib/bin/gunzip -lv #{file} |
/usr/bin/sed 's/^[^ ]* [^ ]* \(... .. ..:..\).*/\1/'`.chomp</FONT></DIV>
<DIV><FONT size=2>p @snaptime</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>...and it should (to me, anyway) return:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>"Jun 12 13:54"</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>...instead of the odd result of:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>"\001"</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>What gives? That's not a returned error code, is
it?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I tried "system()" but it doesn't return a string the way I
want, and it didn't work anyway.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>What's the accepted way to use a UNIX pipe? I wound up
using Ruby commands instead of sed...</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>
---- extPart_ST_17_54_30_Thursday_June_13_2002_10939--