LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 12-19-2004, 11:01 PM   #1
speedhead34
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Rep: Reputation: 0
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
 
Old 12-19-2004, 11:40 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
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?
 
Old 12-20-2004, 12:17 AM   #3
speedhead34
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Original Poster
Rep: Reputation: 0
date & time only once, & then display of line numbered contents

thanx
 
Old 12-20-2004, 12:36 AM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Homework...
 
Old 12-20-2004, 12:50 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
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
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Writing a shell script mattz40 Debian 5 04-13-2005 06:56 PM
writing a shell script tchoua Linux - General 8 02-24-2005 06:18 PM
shell script writing ust Linux - General 6 01-24-2005 01:06 PM
help writing shell script np complete Linux - Newbie 6 08-30-2004 09:43 PM
Need Help in Writing a Shell Script. KptnKrill Linux - General 2 05-19-2003 05:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration