Debian Codegraph @

ex1a.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # Proper header for a Bash script.
3
4 # Cleanup, version 2
5
6 # Run as root, of course.
7 # Insert code here to print error message and exit if not root.
8
9 LOG_DIR=/var/logscip-shell filesystem . . `/var/log`.
10 # Variables are better than hard-coded values.
11 cd $LOG_DIR
12
13 catscip-shell system . . cat. /dev/nullscip-shell filesystem . . `/dev/null`. > messages
14 catscip-shell system . . cat. /dev/nullscip-shell filesystem . . `/dev/null`. > wtmp
15
16
17 echoscip-shell system . . echo. "Logs cleaned up."
18
19 exit # The right and proper method of "exiting" from a script.
20 # A bare "exit" (no parameter) returns the exit status
21 #+ of the preceding command.