download opensolaris in one easy command line operation
Wednesday, Oct 26. 2005 – Category: Musings, OpenSolaris
inspired by a random chat in #opensolaris (irc.freenode.net) with alan and ben, i wrote the following command line statement you can type in (works on bash!) to download OpenSolaris x86 bits in one fell swoop:
for url in wget -q -O - "http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=7&PartDetailId=Open-Sol-1-EA-Sp-x86-G-B&TransactionId=noreg" | grep "<a HREF.*EComTicketServlet" | awk -F\" '{print $2;}'; do if [ ! -f $(basename "$url") ]; then wget "$url" -O $(basename "$url"); fi; done
note: that’s all on one line.
it even checks to see if the file exists beforehand.
No Trackbacks to “download opensolaris in one easy command line operation”
6 Comments to “download opensolaris in one easy command line operation”
-
ux-admin Says:
October 27th, 2005 at 01:21Please don’t say “works on bash!” It’s not something to be proud of. bash is a really bad, broken piece of software. We really should spend some time to educate people about tcsh and perhaps zsh. Most of the people I work with that sing kudos to bash do so only because they’re completely unaware that there are better and more functions things like tcsh and zsh out there.
-
Stephen Lau Says:
October 27th, 2005 at 09:17i’ve never had bash fail on me for anything i need it to do, so why switch?
what kind of car do you drive? are you aware that there are better cars out there? why don’t you switch? because the cost of switching is expensive (i.e.: learning a whole new syntax; or in the car analogy: purchasing a whole new car), and your current car is fine. it gets you from point A to point B.
it becomes dangerous when you get religious about software… whatever technical merits you may be preaching (and you didn’t actually outline any reasons why tcsh/zsh are better) get lost in the message.
-
Vladimir Kotal Says:
November 1st, 2005 at 07:56I think that the general opinon ‘bash is bad’ stems from the fact that bash offers “non-standard” features above other shells. This can result in non-functional scripts in an enviroment where multiplicity of shell scripts is used. For example, most of my colleagues (UNIX admins) write shell scripts in bash but on production servers they are often run under /bin/sh or zsh which causes problems because they tend to use bash-specific features (http://www.tldp.org/LDP/abs/html/portabilityissues.html) without knowing this.
-
Stephen Lau Says:
November 1st, 2005 at 10:08Right – but this isn’t a “bash is bad” problem… this is a “non-portable code is bad” problem, and this is endemic of any code. the same thing happens when you write C code, but all you have on your target machine is a JVM and no C compiler. is it fair to say “C is bad!”. no, of course not. it’s the programmer that is at fault for writing non-portable code.
blame the coder, not the tool.
-
ux-admin Says:
January 17th, 2006 at 06:25To answer your question — somewhat belatedly — I drive a car optimized for performance in every respect. I spared no expense either — did the research of the designs, did the planning. But then again, I’ve been working on cars since I was about four years old, so when I pick an automobile, you can bet good money it’ll be something not good, but awesome, even if that is not apparent at first glance.
Could I go buy a better car? Perhaps, perhaps not, but I could certainly go out right now and buy just about any car I fancy. So the analogy your’re trying to make here doesn’t compute, at least not in my case.
Moving right along, it is shells like bash that encourage writing of unportable code, but what’s even worse, they create a negative downward spiral of ignorance. And excellent example of that is lobbying to make bash the default shell for all users — including root — a proposition that can only stem from lack of experience.
So where is the problem? It’s not in bash — that’s effect. What is the cause then? Lack of education. How do we fix it? We educate users. Point out that bash is not the right tool for the job, becase of this, that, and the other. Since we still lack constructivness, point out the alternatives that do work right and encourage writing portable code.
-
ux-admin Says:
January 17th, 2006 at 06:30And BTW, I never suggested that bash is an evil spawn of satan — I’m an engineer, I don’t do myths, only facts.
Leave a Reply
Recent posts
- Gesture Lock
(Saturday, Nov 13. 2010 – 12 Comments) - ConnectIn 1.1.1 & HTC Sense UI
(Tuesday, Sep 28. 2010 – 38 Comments) - ConnectIn
(Saturday, Sep 25. 2010 – 62 Comments) - Proguard, Android, Ant, and 3rd party external JARs
(Wednesday, Sep 22. 2010 – 18 Comments)
Categories
- Android
- Cars
- ChinaBlog
- Code
- Computers
- Development
- Food
- Football
- Grommit
- Linkage
- Movies&TV
- Music
- Musings
- OpenSolaris
- OpenSource
- Outdoors
- Pets
- Photos
- Quotage
- Rdio
- Songbird
- Sun
- Travel
Grommit
Mozilla
OpenSolaris
- alan burlison
- bonnie corwin
- eric boutilier
- glynn foster
- jim grisanzio
- mark nelson
- mike kupfer
- planet opensolaris
- stephen hahn
Songbird
Archives
- November 2010
- September 2010
- August 2010
- June 2010
- May 2010
- February 2010
- January 2010
- December 2009
- October 2009
- September 2009
- August 2009
- June 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
- July 2003
- June 2003
- May 2003
- April 2003
- March 2003
- February 2003
- January 2003
- December 2002
- November 2002
- October 2002
- September 2002
- August 2002
- July 2002
- June 2002
- May 2002
- April 2002
- March 2002
