Answer the question
In order to leave comments, you need to log in
How to write a bash script correctly?
#!/bin/bash
apt-cdrom add
mount /dev/sr0 /media/cdrom
apt-cdrom -m add
umount /media/cdrom
apt update
apt dist-upgrade -y
apt -f install -y
Answer the question
In order to leave comments, you need to log in
This "serious script" contains a set of simple commands. Run them in the same sequence as they run from a file and see where it fails. At the same time, pay attention to which user the script is run from and from whom you will run. You need to understand what is happening and this is the only right way. If they tell you what exactly is wrong, you will step on the same rake another time.
We are using the Enterprise Library . It allows you to implement a comprehensive solution for the project infrastructure, including logging, monitoring, status control, notifications, and a bunch of other usefulness.
The logging approach is described here .
There is also a library for ASP.NET called Elmah . There is a small article here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question