Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

trap cleanup

What is a VPC: your own private network inside one AWS Region, example ThreeTierVpc 10.0.0.0/16.

trap cleanup Scripts must clean up always. trap runs code on a signal. EXIT covers normal and error exits. Remove the lock file.
trap cleanup · Download PNG
Read card text

What this card says

Why do we need it?

Scripts must clean up always.

What is it?

trap runs code on a signal.

How to do it

EXIT covers normal and error exits.

Example

Remove the lock file.

trap 'rm -f /tmp/job.lock' EXIT

See all AWS revision cards