#!/bin/bash
# Remove the /a/b/c/d directory
rm -rf /a/b/c/d
# Check if the /a/b/c/d directory has been removed
if ! ls /a/b/c/d &>/dev/null; then
echo "Directory /a/b/c/d has been removed successfully."
else
echo "Directory /a/b/c/d still exists."
exit 1 # Exit the script if the directory was not removed
fi
# Create new directories /a/b/c/d/d1, /a/b/c/d/d2, and /a/b/c/d/d3
mkdir -p /a/b/c/d/d1 /a/b/c/d/d2 /a/b/c/d/d3
# Confirm the directories have been created
echo "Checking the contents of /a/b/c/d:"
ls -l /a/b/c/d
# The output of ls will show the contents of /a/b/c/d directory, including d1, d2, d3