[PLUG-TALK] What they teach in CS classes
Michael Rasmussen
mikeraz at patch.com
Tue Dec 6 14:56:17 UTC 2005
On another list I saw this appeal:
Ok, am computer science major and all my programming class have dealt
with java, but I have been given the assignment of writing a shell
script in Linux. We haven't talked about Linux, grep, or shell scrips
in class so this is a " do some research, try it and see what you get"
kind of thing.
I used a text editor and saved the file as a .sh. Now my problem
is trying to run it so as to test it. based on what I have found
online, I opened Konsole and can do some commands, but still
can't get the darn thing to run. I have the file I want to run
on my desktop, and put it in its own folder (has two .txt files,
that it will use, in the folder with it). I can type "ls" and
see the folders desktop and workspace, but I can't seem to get
into desktop to run the program. I have tried different ways of
typing the command to go into that folder (used this to help me:
http://www.axisoftime.com/linux/docs/new2unix.html#sect2.3.1), but
have still no luck with it yet.
Can someone give me some assistance with this? I would really
appreciate it. :)
This is followed by a flood of answers about chmod, pathing, and
everything else one would need to know to write and run a script.
The author continues:
Thanks to all of you who gave me some tips on how to get to my shell
script and make it run. You were a big help. :D
The goal of this shell script it to read all the 4 character length
palindromes from a text file, then sort them in decreasing order and
output them into another text file. I am also suppose to count the
number of palindromes that are found and print that number to the
screen. Then wait for the user to hit the enter key and then print
out the text with all the palindromes and end the program.
At the point I think: homework assignment! You don't say "Oh, go out
and see what you can find about shell scripting then do ... where ...
is a pretty specific set of things.
I wrote to the author and point blank asked if it was homework:
That sounds like the description of a problem one would get in a class.
Are you asking us to do your homework?
Which brought the reply:
Did you read the very first post I made on this?? If not,you can find
it in the archives. I am taking a class on Operating systems, we
don't talk about Linux and how to do shell scripts in class and I have
no books on Linux. This email list will be part of my list of
recourses along with the numerous web sites I have visited.
I still don't think this is the way they teach CS. But faced with the
straight denial replyed:
Have you visited:
http://www.google.com/search?hl=en&q=bash+shell+scripting&btnG=Google+Search
And did anyone recommend:
http://www.tldp.org/LDP/abs/html/ ??
This tutorial assumes no previous knowledge of
scripting or programming, but progresses rapidly toward an
intermediate/advanced level of instruction . . . all the while
sneaking in little snippets of UNIX® wisdom and lore. It
serves as a textbook, a manual for self-study, and a reference
and source of knowledge on shell scripting techniques. The
exercises and heavily-commented examples invite active reader
participation, under the premise that the only way to really
learn scripting is to write scripts.
No books needed with a online resource like that.
I still feel like the writer is BSing everyone.
--
Michael Rasmussen, Portland Oregon
Be appropriate && Follow your curiosity
http://www.patch.com/words/
The fortune cookie says:
Stenderup's Law:
The sooner you fall behind, the more time you will have to catch up.
More information about the PLUG-talk
mailing list