Hi folks,
I'm trying to perform the following function within Perl:
@ret=system("/bin/rtr_cmd1 $rtr_name \"show bgp summary\" | sed -e 's/\([0-7]d\) \([0-9]\)/\1\2/gi ; s/Last Up/Last_Up/gi'");
print @ret;
When I run the command through the shell, as in:
shell# /bin/rtr_cmd1 rtreqab "show bgp summary" | sed -e 's/\([0-7]d\) \([0-9]\)/\1\2/gi ; s/Last Up/Last_Up/gi'
everything works fine - sed is properly manipulating the data stream and outputting it properly, however, within my perl script, sed does not seem to be working properly, i.e., it is not handling the stream in a similar manner as when I run the command straight from shell.
Any assistance is greatly appreciated!
Regards,
--
Stefan Fouant
Principal Network Engineer
NeuStar, Inc. - GPG Key ID: 0xB5E3803D
I'm trying to perform the following function within Perl:
@ret=system("/bin/rtr_cmd1 $rtr_name \"show bgp summary\" | sed -e 's/\([0-7]d\) \([0-9]\)/\1\2/gi ; s/Last Up/Last_Up/gi'");
print @ret;
When I run the command through the shell, as in:
shell# /bin/rtr_cmd1 rtreqab "show bgp summary" | sed -e 's/\([0-7]d\) \([0-9]\)/\1\2/gi ; s/Last Up/Last_Up/gi'
everything works fine - sed is properly manipulating the data stream and outputting it properly, however, within my perl script, sed does not seem to be working properly, i.e., it is not handling the stream in a similar manner as when I run the command straight from shell.
Any assistance is greatly appreciated!
Regards,
--
Stefan Fouant
Principal Network Engineer
NeuStar, Inc. - GPG Key ID: 0xB5E3803D