new to linux/Ubuntu/shell scripting . . .

Robert Stoffers rstoffers at gmail.com
Sun Dec 4 09:17:01 UTC 2005


On Sun, 2005-12-04 at 00:52 -0800, Rachael C. wrote:
> 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.
> 
> For this assignment I installed Ubuntu (onto a spare hard drive I had)
> and have found what I want to put into my little shell script.  I used
> a text editor in Ubuntu 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. :)
> 
> Thanks in advance,
> Rachael
> 

Hi,

You need to do the following:

chmod +x script.sh      (replace script.sh with the file name of the
script)

./script.sh             (do this in the same directory to run the
script)


Regards,
-- 
Robert Stoffers
Author/Maintainer - Ubuntu Starter Guide
Ubuntu Documentation Team






More information about the ubuntu-users mailing list