| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | filename=sys.log |
| 4 | |
| 5 | catscip-shell system . . cat. /dev/nullscip-shell filesystem . . `/dev/null`. > $filename; echoscip-shell system . . echo. "Creating / cleaning out file." |
| 6 | # Creates the file if it does not already exist, |
| 7 | #+ and truncates it to zero length if it does. |
| 8 | # : > filename and > filename also work. |
| 9 | |
| 10 | tailscip-shell system . . tail. /var/log/messagesscip-shell filesystem . . `/var/log/messages`. > $filename |
| 11 | # /var/log/messages must have world read permission for this to work. |
| 12 | |
| 13 | echoscip-shell system . . echo. "$filename contains tail end of system log." |
| 14 | |
| 15 | exit 0 |