simple bash script
Write a Bash script that displays the system status according to:
- CPU, - storage, - disk, - network. The script should use a basic commands of the Linux operating system and builds a simple dashboard including as much information as possible. The system data should be saved into script variables or arrays. Can any1 help me to do this ? We must use: man, find, cut, sort, tee, echo, wc, ps, grep, whoami. awk and sed is prohibited. |
No! We aren't going to do your homework for you! That's called "Cheating". Do your best and if you have ***SPECIFIC*** questions then please ask again.
|
Quote:
Code:
man find |
This is no homework. I readed all the manuals for the commands, but even know i dont know how to start
How to display system status for CPU and so on ? I dont find the command |
Please don't insult our intelligence, there is NO WAY this is not an assignment. You've pasted it in verbatim, and evn put in comments about certain commands not being allowed, which is SUCH a giveaway it's unreal.
|
I say it again! Its not a homework. Its just a personal matter! If u dont believe me then nothing. I asked nicely, cuz i dont know what to do, and this is what i get. Such a kindness really.
|
Quote:
http://tldp.org/LDP/Bash-Beginners-G...ers-Guide.html Kind regards |
if this was my personal issue, then my solution would probably have awk and sed all over it. Would that be OK? If not, why not?
|
No, i wanna learn it without awk/sed
I have another question. I did cat /etc/passwd | grep "/home" | cut -d: -f1 | bla blabla blablabla cat /etc/passwd | grep "/home" | cut -d: -f1 | wc -w 3 that counts the words now i wanna print into echo this counted number.. how i do that? echo "number of counted words are %d(the wc -w count must be here) " ?? |
How about you solve one problem at a time. You claim it is not homework, so i will believe you for now. Show us what you have done so far and we will assist?
So far the only help I would give is that nearly everything you have asked when searched in google seems to have many, many responses. |
Perhaps the OP misses the fact that this very same set of questions/homework have been posted here before. Nobody much warms to helping a liar.
|
Quote:
Code:
someoutput=`cat /etc/passwd | grep "/home" | cut -d: -f1 | wc -w` |
Quote:
If it WAS a random question, you'd just ASK it, and say "How could I monitor CPU with a bash script?", and not worry about the command(s) used to do it. And spell out your words....that text speak garbage isn't a good thing to post in. |
All times are GMT -5. The time now is 06:46 PM. |