Overview: Write a tiny shell utility that locates the lexicographically smallest absolute path to a regular file anywhere beneath your home directory. The file's path should be printed. Do not print the file's contents. The search should include hidden files and subdirectories.
Steps:
Create a script at /app/find_first_home_file.sh that uses standard Unix tools (find, sort, head).
It should consider only regular files (-type f) under "$HOME" and output the smallest path in lexicographic order.
The script must handle spaces in filenames gracefully.
If no regular files exist under $HOME, print a clear message: "No regular file found under $HOME".
Make the script executable and run it: /bin/bash /app/find_first_home_file.sh
Expected deliverable: a single line printed: the absolute path to the first file, or the empty-case message.
Implementation hints:
Use find "$HOME" -type f -print, pipe to sort, take first.
Example run:
$ /bin/bash /app/find_first_home_file.sh
/home/user/notes/todo.txt
Notes:
The script should not print the contents of the files.
The search includes hidden files and directories; only regular files are considered.