Results 1 to 3 of 3
Okay, I'm a college student and I'm having a really hard time with our scripting lab. I was wondering if anyone had any sites to suggest me visiting that might ...
- 11-29-2007 #1
Assistance and Suggestions needed please...
Okay, I'm a college student and I'm having a really hard time with our scripting lab. I was wondering if anyone had any sites to suggest me visiting that might help me with the following question:
"Create a script that will produce a text file that has a list of the files in the present working directory. Ensure you use the proper syntax to allow auto-execution from the command prompt. Use internal documentation (comments) to place your name and the course name in the script."
I've gotten the script to create the text file listing the files of the current directory, ls -a |tee AllFiles.txt, but getting it to include my name and course name in the script is where I get lost.
Any suggested sites would be greatly appreciated... Thanks.
- 11-29-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Just a couple of hints.
Will create or overwrite the file a.txt, the file will only contain "some text"Code:echo "some text" > a.txt
Will create or append the file a.txt, if you run both of those commands a.txt will containCode:echo "Some more text" >> a.txt
some text
Some more text
This is called redirection
Have a play, and you don't need anything more than to add some > and >>
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 11-29-2007 #3
Thanks, the help is very much appreciated.

Well, I think I got that first part figured out. Now I'm off to work on the next part.Last edited by ~Lexy~; 11-29-2007 at 04:26 PM. Reason: Working on the next part of the Lab...


Reply With Quote