Search Results

Search: Posts Made By: harleyvrodred
2,420
Posted By Aia
Run as perl example.pl harleyvrodred.example ...
Run as perl example.pl harleyvrodred.example

my %tmp;
my %parameters;
while(<>){
if(/<parameter name/../<\/parameter/){
/(name)="(\w[^"]+)/ and $tmp{$1} = $2;
/(unit)="([^"]+)/ and...
2,420
Posted By Don Cragun
Hi RudiC, I should know better than to try to...
Hi RudiC,
I should know better than to try to make code easier to read after it has been tested. :mad:

My post #7 has now been updated as you suggested.

Thanks,
Don
2,420
Posted By RudiC
Small correction to Don Cragun's fine proposal:...
Small correction to Don Cragun's fine proposal: in the sprintf command, replace "pat" by "pattern" to get the desired result.


Use this for the last occurrence of the pattern in file:
awk '...
2,420
Posted By Don Cragun
Without knowing what shell you're using, we can...
Without knowing what shell you're using, we can only guess at how the output of a command should be assigned to a shell variable. And, without knowing what operating system you're using, we have to...
2,420
Posted By RudiC
A bit difficult to look for "Panel Temp" if...
A bit difficult to look for "Panel Temp" if there's none in the input file.
OK, looking for "Coolant" in lieu, try
awk '
match ($0, /"Coolant Temp"/) {printf "{%s", substr ($0, RSTART, RLENGTH)...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 04:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy