-   Linux - Newbie (
-   -   writing my first shell script (

speedhead34 12-20-2004 12:01 AM

writing my first shell script
ok, never done shells before,

i have to design and implement a script that provides line numbered contents of a file.

i must make use of the following:

#control structures
#command line arguments

the display of the line numbered contents of the file should be prefaced with the current date and time.
the script should also set the PATH enviroment variable back to its default at the end of the script.

any pointers hints tips would be much appreciated

thank you very much

wapcaplet 12-20-2004 12:40 AM

This sounds suspiciously like school homework :)

If so, my suggestion is to ask your teacher for help. If s/he didn't provide you with the necessary resources to do this assignment, then you should ask for assistance from them.

If this is not homework, then perhaps you could elaborate a bit: does the date/time need to be printed before every line of output, or just at the beginning? And how is it that the PATH environment variable would change during the course of this script?

speedhead34 12-20-2004 01:17 AM

date & time only once, & then display of line numbered contents


cs-cam 12-20-2004 01:36 AM


Tinkster 12-20-2004 01:50 AM

Sounds like homework to me, too ... please do not post homework
questions here as per the rules that you accepted when you
signed up.


All times are GMT -5. The time now is 11:58 PM.