Long questions
1.Write a shell script to print below pattern #!/bin/bash # Number of rows for the pattern rows=4 # Loop through each row for ((i=0; i<rows; i++)); do # Print numbers from 0 to i for ((j=0; j<=i; j++)); do echo -n "$j " done # Move to the next line after each row echo done 2.Write a shell script to compile all C files and delete those files having errors. #!/bin/bash # Compile each .c file in the current directory for file in *.c; do # Check if there are any .c files if [ ! -e "$file" ]; then echo "No .c files found." exit 1 fi # Try to compile the .c file gcc "$file" -o "${file%.c}.out" # Check if the compilation was successful if [ $? -ne 0 ]; then echo "Compilation failed for $file. Deleting th...