← All RHCE Flashcard Decks

Scripting and Task Scheduling Flashcards

6 cards from real RHCE practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 Scripting and Task Scheduling flashcards as text
  1. What `bash` option makes a script exit immediately if any command fails?

    Answer: set -e

    `set -e` (errexit) causes the script to exit immediately if any command returns a non-zero exit status.

  2. Which command lists pending `at` jobs?

    Answer: Both A and B

    Both `atq` and `at -l` list pending at jobs; `atq` is a traditional shorthand while `at -l` is the long form.

  3. What does `${#VAR}` return in a bash script?

    Answer: Length of the string in VAR

    `${#VAR}` is bash parameter expansion that returns the number of characters in the string value of VAR.

  4. Which `for` loop syntax in bash iterates over a list of numbers 1 through 5?

    Answer: for i in {1..5}; do

    Bash brace expansion `{1..5}` generates the sequence 1 2 3 4 5, which the `for` loop iterates over.

  5. What is the purpose of the `/etc/cron.deny` file?

    Answer: Lists users who are NOT allowed to use crontab

    Users listed in `/etc/cron.deny` are not permitted to create or modify crontab entries with the `crontab` command.

  6. Which systemd command shows the output (logs) of a timer-triggered service?

    Answer: journalctl -u myservice.service

    `journalctl -u myservice.service` shows the systemd journal logs for the service unit that the timer activates.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. redhat.com — Test delivery, renewal, score validity, exam format, score release · verified Oct 2026