I need to write a perl program which is equivalent to this shell program. Any help would be appreciated.
cat /var/adm/messages | grep -i errors > /tmp/file1
cat /tmp/file1 | awk '{print $1, $2, $3}' > /tmp/file2
while read col1 col2 col3
do
variable1=`unix_command $col1 | awk '{print $1, $2 $3}'
variable2 = `unix_command2`
variable3=`unix_command3`
echo $variable1 $variable2 $variable3 >> /tmp/file3
done < /tmp/file2
cat /tmp/file3 /tmp/some_file > final_report
cat /var/adm/messages | grep -i errors > /tmp/file1
cat /tmp/file1 | awk '{print $1, $2, $3}' > /tmp/file2
while read col1 col2 col3
do
variable1=`unix_command $col1 | awk '{print $1, $2 $3}'
variable2 = `unix_command2`
variable3=`unix_command3`
echo $variable1 $variable2 $variable3 >> /tmp/file3
done < /tmp/file2
cat /tmp/file3 /tmp/some_file > final_report