That attempt to pipe one statement to another statement like you would do when piping shell commands won't work.
You've already been shown a couple ways to extract the datestamp.
$error = '2014-06-04T15:24:21-05:00 syslog_dp [0x80e00099][ftp][error] + secure-backup(FBB): trans(5487)'; $time = (split /\s/, $error)[0]; print $time, "\n"; # or you could do this: ($time) = $error =~ /^(\S+)/; print $time, "\n";
In reply to Re^3: Simple awk question
by fishmonger
in thread Simple awk question
by czah7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |