Hello everyone.
I'm one of the many person who are just starting to use linux (suse). I'm also a beginner in scripting (in suse linux).
Can anyone help me here with my homework. It is about scripting. The questions are listed below.
Create a script that would check if a certain interface hasn't been receiving any packets/bytes from the network. You can know such by checking whether the second column after the interface name (e.g. eth0

would have a value of 0.
Should it encounter ethernet devices (devices that start with eth), save the name of the network interface to the file named
ifnet_inactive.
1. Test first for the existence of /proc/net/dev.
2. There would be an extensive need to use POSIX regular expressions and sub-expressions (expressions contained inside parentheses).
3. Use sed to format the output of /proc/net/dev. You need to suppress the automatic printing of pattern space when giving the sed action for printing the current pattern space.
4. The interface name is only 4 characters long. You need to save only the interface name and NOT anything more (such as the colon punctuation mark). You can use the cut utility for this.
5. You'd use pipelining and redirection extensively.