LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   writing my first shell script (https://www.linuxquestions.org/questions/linux-newbie-8/writing-my-first-shell-script-268255/)

speedhead34 12-19-2004 11:01 PM

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
#files
#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-19-2004 11:40 PM

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 12:17 AM

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

thanx

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

Homework...

Tinkster 12-20-2004 12: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.

http://www.linuxquestions.org/rules.php


Cheers,
Tink


All times are GMT -5. The time now is 02:43 PM.