Print a randomly selected CSV file from the home directory
In this task, write a small Bash script that picks at random one CSV file located anywhere under your home directory and prints its contents to stdout. If no CSVs exist, print a concise error message to stderr and exit with code 1.
Steps:
Create a file named print_random_csv.sh.
Implement the logic using find to locate files named *.csv case-insensitively under $HOME, with proper handling of spaces.
If zero CSV files found, print No CSV files found in $HOME to stderr and exit 1.
Randomly select one file from the matches and print its full contents to stdout (use cat or similar).
Make the script executable (chmod +x) and run it to verify.
Deliverables: The script file contents, not the outputs from running it, saved as print_random_csv.sh.
Note: If the chosen CSV is large, printing its entire contents may take time. The script should handle paths with spaces correctly.