forked from iliomar/shell-tutorial-assignment
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
37 lines (31 loc) · 1008 Bytes
/
Copy pathsetup.sh
File metadata and controls
37 lines (31 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
echo "Setting up your shell-tutorial-assignment environment..."
# Create required directories
mkdir -p data
mkdir -p problems
mkdir -p solutions
mkdir -p results
mkdir -p simulation_logs # For Problem 3
# Create sample cosmic ray CSV for Problem 1
cat <<EOF > data/cosmic_rays.csv
particle_type,energy_GeV,flux
proton,10,150
electron,5,80
proton,20,210
muon,15,40
electron,12,100
EOF
# Create sample simulation log files for Problem 3
for i in {1..3}; do
cat <<EOF > simulation_logs/run_${i}.log
INFO: Simulation started for run ${i}
WARNING: Minor issue detected in run ${i}
ERROR: Something went wrong in run ${i}
INFO: Simulation completed for run ${i}
EOF
done
echo "Directories and sample data created!"
echo "Created: data/, problems/, solutions/, results/, simulation_logs/"
echo "Sample files: data/cosmic_rays.csv and 3 simulation_logs/run_*.log files"
echo "You're ready to start working on the assignments! "
echo "Setting up the environment for Shell Tutorial Assignment..."