Concert my Bash Script to Powershell $10-30 USD Posted almost 7 years ago
$10-30 USD Paid on delivery
Please convert this bash code to Powershell with proper commenting, describing the program.
#!/bin/bash
scriptPID=$$
myarr=($(ps -ef | grep [login to view URL] | grep -v grep |awk '{print $2}'))
if [ ${#myarr[@]} -gt 1 ]
then
for i in "${myarr[@]}"
do
echo "outside $i"
if [ "$i" -ne "$scriptPID" ]
then
echo "inside $i and killing"
kill -9 $i &>/dev/null
fi
done
fi
timeout 600s find -H / -type f -exec stat -c "%n %U %G %a %s %Y" {} \; 2>/dev/null >/tmp/`hostname`_`date +%Y%m%d_%H%M`.txt &
PID=$!
sleep 605
if [[ $(ps -o pid= --ppid $PID &>/dev/null) ]]; then ps -o pid= --ppid $PID | xargs kill -9; fi
Project ID: 14348481
About the project 3 proposals
Remote project
Active 7 yrs ago
Looking to make some money? Email address Apply for similar jobs Benefits of bidding on Freelancer Set your budget and timeframe
It's free to sign up and bid on jobs
3 freelancers are bidding on average $53 USD for this job
I can complete the task within 2-3 days.
Relevant Skills and Experience
Bash, Power Shell, Perl, Python
Proposed Milestones
$24 USD - New to this freelancing world.
$24 USD in 3 days
0.0 (0 reviews)