Quote:
Originally Posted by HeLpInLiNuX
PLEASE HELP ME IN ANY WAY. I WILL PAY YOU.
|
I doubt that this is the kind of help that you want, but you certainly will not pay me. Anyway, what I will do for you is re-phrase the questions that you are being asked, so that it is clear what you need to achieve the objectives.
Quote:
1. Write a script named "monthyr.bash". The script will prompt the user for the month and then the desired year to be displayed on the screen. Then your script will execute and display the desired calendar month and year on screen.
|
As has already been stated, a script is merely a list of the commands that you would use, at the command line, in order to achieve a task. so, you have to know what commands you might use, at the command line, to achieve this.
(One tip: if you only know one command, it ought to be the 'man' command. One variant, 'man -k' (or, equivalently, 'apropos') will return all system commands that concern a particular subject (more technically, will return a list of the commands which have the given word in their brief description, along with the brief description).
So, while you might think of writing your own calendar program, a better thought might be to have a look at whether there is a calendar program on the system that you can use. This should give you a hanful of 'hits' of which one or two might be more appropriate than others. now one of the less useful 'hits', in this context would be to 'orage' (which may or may not be installed on your system, but just as an example...), so, to prove this, you would type 'man orage', and you'd find out that orage is a graphical application, which you don't want.
Quote:
2. Write a script named "dusage.bash" .
|
Find a system program that gives you info about disk usage. You'll find at least a couple, using the method above. If, for example, you choose 'man -k usage' you'll get more info than you want, and so 'man -k usage | grep -i disk' might be preferred.
Is there something that gives you the info that you need, even if you get too much info (hint: yes)? could you then take that 'too extensive' output and pipe it through 'grep', in exactly the way that the man output above has been piped through grep to get something more useful (hint: yes)?
Quote:
3. Write a script "total.bash" that will calculate the total amount purchased based on the number of units purchased @ $10 each.
|
This question seems to ask whether you can multiply something by 10 in a script. The answer should be yes, but you'll need to look for some kind of calculator (see method above). And you'll have to tell the calculator the number (presumed integer) of items, multiply and ten. You'll need the man page for that.
I'm bored now, but, if you want further help, you'll want to show what you've tried (in code tags), and what happened that you thought was wrong. There is a very limited extent that people will tell you the answers, but you might get a shove in the right direction, if you have tried and are making an obvious oversight.