# \#example

**URL:** https://discuss.circleci.com/tag/example/316.md

[Latest](https://discuss.circleci.com/latest.md) · [Categories](https://discuss.circleci.com/categories.md) · [Tags](https://discuss.circleci.com/tags.md)

---

## [Example bash script to get details about why a step failed](https://discuss.circleci.com/t/example-bash-script-to-get-details-about-why-a-step-failed/38996)

<div class="topic-metadata">

**Author:** [@nbialostosky](https://discuss.circleci.com/u/nbialostosky)\
**Replies:** 0\
**Last updated:** [February 2, 2021, 6:26pm UTC](https://discuss.circleci.com/t/example-bash-script-to-get-details-about-why-a-step-failed/38996 "2021-02-02T18:26:18Z")

</div>

Hi There! Recently the Support team created a script to easily get the last few lines of a failed step. This script can be used to pull details via the API on why a step exited as it returns the last 20 lines of the log…
