1#!/bin/bash
2# Automated test demonstration of the Student Management System
3
4echo "==================================="
5echo "Student Management System Demo"
6echo "==================================="
7echo ""
8
9# Create a temporary input file for automated testing
10cat > test_input.txt <<EOF
119
12sample_students.csv
135
147
156
163
175
183
191001
204
21Alice
226
232
245
258
26output.csv
271
281009
29Test Student
30Chemistry
313.55
325
330
34EOF
35
36# Run the program with the test input
37echo "Running automated test sequence..."
38echo ""
39./student_manager < test_input.txt
40
41echo ""
42echo "==================================="
43echo "Test Complete!"
44echo "==================================="
45echo ""
46echo "Generated files:"
47ls -lh output.csv 2>/dev/null && echo " - output.csv (saved database)"
48echo ""
49
50# Clean up
51rm -f test_input.txt
52
53echo "To run the interactive version, execute:"
54echo " ./student_manager"