in reply to Re^2: Write to rsyslog
in thread Write to rsyslog
> I'm supposing the OP wants to know how to use system or `backticks` in Perl, because calling CLI programs directly is interwoven into bash
LanX, given your insightful "that's similar to how I migrated from Bash to Perl" reply to this node's "Perl" code:
system ('grep -l "DATAmessage.*3\.0" *.xml > 3.0_files_arraydata.txt') +; system ("mv temp_3.0_files_onixarraydata.txt 3.0_files_arraydata.txt") +; system ("cat *files_arraydata.txt > data2.txt"); system ("rm data2.txt");
it seems you would know. :-)
Once the OP posts the working bash script, I trust we could rewrite it in Perl a bit more cleanly than the above monstrosity.
See Also
References Added Later
Updated: many references were added long after the original reply was made
👁️🍾👍🦟
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Write to rsyslog
by LanX (Saint) on May 16, 2024 at 11:33 UTC |