Thursday, July 30, 2009

Wubi - Updated Instructions.

For Wubi - go here instead: http://www.ubuntu.com/getubuntu/download The wubi link was taking too long to download everything necessary. Go to the aforementioned link, I chose 'United States OSU Open Source Lab' as my locaton, and downloaded the ISO. It takes ~4hrs to download over DSL. If you have dial-up or a slow connection, (and you live locally) contact me.

Next, go here [http://www.slysoft.com/en/download.html] and download Vitual Clone Drive.and associate .iso type files to it.
Double Click the .iso file you saved, and then click on Wubi.exe to begin your install - I chose 20GB for my install size.

Wednesday, July 29, 2009

Wubi is here!

What is Wubi - go to angel, check out the new assignment and find out!

Things are beginning to wrap up, so it's time for you guys to have your very own Linux Box, and see it as more than just a console window. Look over the assignment, install Wubi, answer the questions. Do this by Sunday.

Based on Wubi and the joy that comes with it, there will be a new discussion posted this Sunday, and assignment 7.2 - remember that scavenger hunt?

Also, I hope by this weekend, I'll figure out why your grades aren't displaying on Angel.

Next Wednesday, I'll post the final it'll be over Vi, Linux commands, and scripting.

Any questions, feel free to contact me.
Good Luck!

BTW - No discussion this week, concentrate on getting Wubi installed.

Tuesday, July 28, 2009

Assignment 6 - Deadline extended.

Assignment 6 will be due this Friday, 07/31/2009.
Keep in mind:

${/$/$}

*returns* the string with 'pattern' replaced with 'replace_with', it doesn't change the original string. So you have to do something like this:

string2=${string1/$pattern/$replace_with}

that will swap out 'pattern' with 'replace_with' in string1 and assign that new string to string2.

Any problems/issues, feel free to contact me. Reminder, there are online office hours tomorrow evening from 7pm to 8pm on Angel.

Monday, July 27, 2009

Assignment 6 - Issue.

Apparently, Shaula is running an older version of #bash which has issues with variable scope - in our code snippet:

#!/bin/bash
#sample code for reading in a file line by line.
fileIn=$1

cat $fileIn | while read linein
do
echo $linein
done

the piping into the while statement causes the while-loop to run in a subshell, any variables declared above the 'do' will exist in one shell, any variables used between the 'do' and the 'done' will be declared in another. In other words, when the script exits the subshell, variables will be reset to their values prior to entering the while loop. We can fix it by doing this:

while read linein
do
echo $linein
done < $fileIn

This causes the script to execute within one shell, therefore the variable scope is maintained for the whole script.

Good Luck!

Wednesday, July 22, 2009

New Assignment posted...

Advanced shell scripting this week...
and I'll catch up on grading.

As always, if you have any questions, need any hints, please email me.
Have a good week.

Discussion 6: Open Source for America

Well, we all know the only way to get things done through our government is by lobbyists and coalitions. Looks like the Linux community has caught on, and have created the Open Source for America advocacy group [http://www.opensourceforamerica.org/]

Google around for it, see what you can find out. Which companies are involved in this coalition? What is their goal? Is this going to be beneficial for our economy? or harmful? What are your thoughts?

RE:Discussion 5: Microsoft's Take on Opensource.

Honestly have to say, I did not see this coming:

Microsoft wants interoperability between Hyper-V and Linux, not world domination - But it's definetly a plus for linux users, seems Microsoft is taking the Linux world seriously, I wonder what Bill would have to say.


I'm a little behind in reading your discussion posts - hope to finish up tonight.

Monday, July 20, 2009

Command Line Arguments

Here's a little script that may help you understand how command line arguments are read.
#!/bin/sh
#
# Script that demos, command line args
#
echo "Total number of command line argument are $#"
echo "$0 is script name"
echo "$1 is first argument"
echo "$2 is second argument"
echo "All of them are :- $* or $@"

So if you can set a variable inside of your script like this:
arg1=$1

Assignment 5 - Another Hint

Here's a sample script which changes a directory:


#!/bin/bash
if [ "$#" -eq "0" ]
then
echo "usage: cdTest directory_name"
else
newDir=$1
cd $newDir
fi

Note: Watch the spaces! Unlike other programming langauges, shell programming is a stickler for proper formatting.

Call this script 'cdTest' and run it like:
. cdTest
-or-
source cdTest

and see what it does.

If you guys need extra time, email me, and I'll be willing to extend the deadline. Please note, though, if I extend the deadline, we'll be adding a couple 'extra' features to the assignment.

Saturday, July 18, 2009

Assignment 5 - Hint.

Something to keep in mind - when you're running a bash script by typing "bash " you are actually running the script in a *different* shell not your current one with the command prompt. You need to figure out how to run a script in the *current* shell.

The logic behind Assignment 5 is this:

'my_cd ' will do the following:
will 1st print out the current directory then the directory you are
going to change to, and then change directories to it.

useful commands:
'pwd' returns the current working directory
'cd' changes directory

You need to figure out how to read in an argument from the command
line, put that argument value into your script and then change
directories to the that value.

While also remembering to save the
current directory into a variable so you can go back to it using your
custom 'go_back' script. Then:

'go_back' will:
read the value of the global variable you saved the previous 'pwd' to
then change directories to it.

This can all be done stringing together
linux commands we've already come across

Good Luck! Contact me via email if you need some further hints.

Wednesday, July 15, 2009

New Assignment, New Discussion, plus the VI Quiz

The week's material has been posted - we're beginning shell scripting, this takes some brain power, if you get stuck and need a hint, feel free to contact me. Because of this, this assignment will be due next Tuesday instead of Sunday.

The quiz over VI commands has also been posted, and will be available till this coming Sunday.
Good Luck!

BTW - continuing last week's discussion, you may want to check this out: http://www.wired.com/epicenter/2009/07/google-vs-microsoft-what-you-need-to-know/

Discussion 5: Microsoft's Take on Opensource.

Alright - so you guys are probably sick of discussing the opensource community. But the main attraction to Linux, is the opensource nature of it. As I have stated before, the opensource community is Gene Roddenberry's Utopia. We are developers working towards a better platform. We want to take someone elses idea and improve it; we want to see our ideas improved upon. We're not in it for the money, we're in it to have our ego's stroked, we're in it for the glory.

Microsoft has a different take, which I have no problem with, they are, afterall, a profitable corporation with global dependency. Bill Gates is a genious, and when he talks, people listen.

Here's an article covering Bill Gate's lecture at the Institute of Systems Biology where he touched upon the effectiveness of the opensource community in improving software, and not surprisingly, here's his opinion on opensource software from 1976.

But, they are trying to figure what this entire opensource-thing is about, they've introduced Codeplex (the faq:http://codeplex.codeplex.com) - but it's on their terms, see:http://news.cnet.com/8301-13505_3-10058421-16.html

So, I'd like to know your thoughts on a couple things.

A) Do you think software can be improved through opensource? Or are nominal developers just trying to get their egos stroked - I mean, if they were *real* developers, why are they dealing in opensource?
B) We know Microsoft wants to make money, they are a company, is there a way to make opensource software profitable?

BTW - if anyone's interested, heres a link to a video Bill Gates discussing Microsoft and the Opensource Community @ UC Berkeley.

Quiz - Technical issues.

The quiz over vi commands apparently didn't show itself, I found the issue. It'll be released this evening along side Assignment and Discussion 5. It'll be available till this coming Sunday, 11:59pm

Wednesday, July 8, 2009

Assignment 4 and Grading update.

Hey Guys!
Assignment 4's been published, this week's the Vi Editor. I'm in the middle of getting caught up on grading.

Another great read on your discussion posts! Good Job! Many of you pointed out that you can buy "unlocked" PSPs or iPhones - but keep in mind, these are hacked (proper term is "cracked") devices. The main idea behind an opensource hardware device is it would be open from the manufacturer, and users would be *encouraged* to develop apps for/customize them.

Coming soon is Wubi! You may want to do a little behind the scenes research on it.

Contact me w/ any questions,
Charlie

Discussion 4 - Chrome OS.

Is Linux ready for the big time with Chrome OS?

Google announced their Chrome OS today. Google has become a mainstay in the Internet business, succeeding where others have failed (webcrawler, altavista, jeeves, live search) opening up an industry where even Microsoft is trying to carve out a niche (bing). Google is now going into the OS business, ready to take on the big guns - Microsoft and Apple.
There a lot or articles out about Chrome OS, do an internet search and sum up the features, and give me your thoughts on how/if Google can succeed in this arena - Chrome OS has the potential to revolutionize the PC - similar to what Microsoft did with DOS and Windows.

Please have your thoughts posted to the discussion board by 11:59pm next Tuesday, July 15th

Wednesday, July 1, 2009

Assignment 3 - Clarification.

In assignment 3 - you'll find a list of tasks I want you to find out about our linux server. Show me the results of the task as well as the command (or commands) used to get that result.

If you have any questions, feel free to email me or post a comment here.
Charlie