Shell Scripting Questions
Shell Scripting Questions
1. Write a script to count and display the number of lines in a file containing a specific keyword.
3. How do you check if a file is a symbolic link and print its target?
4. Write a script to merge multiple .csv files into a single .csv while avoiding duplicate headers.
5. How do you recursively search for a specific word in all text files within a directory?
6. Write a script to monitor disk usage and send an email alert if usage exceeds 80%.
7. Create a script to check if specific processes (e.g., nginx, mysql) are running and restart them if
8. Write a script to fetch system uptime and load averages every minute and log them to a file.
9. How do you check CPU usage of a specific process using ps and awk?
Page 1