ansh_1415 has asked for the wisdom of the Perl Monks concerning the following question:
I am new to scripting and need a shell script changed to Perl. Below is the script, can someone please help me out in converting this to PERL.
-MP#!/bin/sh sudo /usr/openv/netbackup/bin/admincmd/bpimagelist -A -media -hoursago + 24 |sed 's/\|/ /'|awk '{print $1}' > /home/h150371a/file.tmp cat /home/h150371a/file.tmp | while read Image do sudo /usr/openv/netbackup/bin/admincmd/nbemmcmd -listmedia -mediaid $I +mage | grep -iE 'Media ID|Data Expiration' >> file1.tmp done if [ -s file1.tmp ] then mailx -s "Daily" ishonbackup.nar@capgemini.com </home/h150371a/ +file1.tmp fi rm /home/h150371a/file1.tmp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Shell script to Perl
by Mr. Muskrat (Canon) on Mar 01, 2016 at 19:42 UTC | |
by perlfan (Parson) on Mar 04, 2016 at 16:57 UTC | |
|
Re: Shell script to Perl
by FreeBeerReekingMonk (Deacon) on Mar 01, 2016 at 20:23 UTC | |
by FreeBeerReekingMonk (Deacon) on Mar 02, 2016 at 09:40 UTC | |
|
Re: Shell script to Perl
by NetWallah (Canon) on Mar 01, 2016 at 19:21 UTC | |
|
Re: Shell script to Perl
by GotToBTru (Prior) on Mar 01, 2016 at 19:00 UTC | |
by ansh_1415 (Initiate) on Mar 01, 2016 at 22:35 UTC | |
by GotToBTru (Prior) on Mar 02, 2016 at 13:02 UTC | |
by poj (Abbot) on Mar 02, 2016 at 08:17 UTC | |
|
Re: Shell script to Perl
by kroach (Pilgrim) on Mar 01, 2016 at 19:00 UTC | |
|
Re: Shell script to Perl
by FreeBeerReekingMonk (Deacon) on Mar 02, 2016 at 20:08 UTC |