Sponsored by Dragon Age: Origins
See the new YouTube feature trailer for Dragon Age: Origins view!
youtube.com/DragonAge - EA presents BioWare's new dark fantasy epic Dragon Age: Origins. '9/10' from Game Informer.
19 Comments
- felis, on 10/12/2007, -0/+7Great little primer - enough to get people started, but not enough to overwhelm a new scripter.
- echimu, on 10/12/2007, -2/+8Good getting started guide. And here are more
BASH Programming - Introduction HOW-TO: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
Linux Shell Scripting Tutorial - A Beginner's handbook: http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/lsst/
Advanced Bash-Scripting Guide: http://tldp.org/LDP/abs/html/ (best one) - Markie1006, on 10/12/2007, -1/+6The thing with vi/vim is that you absolutely hate it for the first 4-6 weeks, then something kinda clicks and you start loving it. After that, there really is no other editor.
For the record, I started using vi 15 years ago, and I still learn new features all the time.
An old unix guru once told me you can do any action you need in vi with 4 keystrokes or less (or you're going about it the wrong way). - Xenogis, on 10/12/2007, -1/+3I knew most of this but it is still kinda cool :D
I didn't know there were select statements in bash. - harisund, on 10/12/2007, -0/+2Yes, powershell is a pretty impressive tool, and yes, from Microsoft.
In fact, you can write batch files that perhaps just have a little less functionality than shell scripts. And with power shell, you can pretty much do everything you can in Linux, in Windows (except maybe recompile the kernel). - xenocrates, on 10/12/2007, -2/+4If you're just starting out, trying to figure out vi, which is what this tutorial uses, can really frustrate the hell out of a person. Don't get me wrong, I love and use vim every single day that I use a computer (emacs,boo!), but for 'noobs,' they maybe should have picked an easier editor to start with.
- ZetaEta, on 10/12/2007, -1/+2I use Pico, because I'm generally not doing a lot of stuff in the console that needs a powerful editor. After all, if I'm using typing macros or copy and paste all the time (aside from closing HTML tags, maybe, or generating lists of things) then I'm probably doing something wrong with both my prose and my code.
- johnstar, on 10/12/2007, -0/+1evil@technolust:~$ echo 'I love bash'
- jasutton, on 10/12/2007, -0/+1Bash + Apache + CGI = easy web application programming
PHP5 is still cooler though :) - Markie1006, on 10/12/2007, -0/+1I think he meant to say 755. Then again I think you're assuming the environment.
For a true multi-user box those are pretty good permissions - 'rwx' for the owner and just 'r' for everybody else. So maybe he doesn't want every idiot user to be able to run his script? - ZetaEta, on 10/12/2007, -1/+1This is one of the reasons that scripting languages came to power: The different shells have different quirks (and even different commands in some), and many people disagree on which one to use. With a scripting language, as long as you have the interpreter installed where everyone can access it, then you can just write a script in that language and not worry about what shell people are using.
Even with that as a given: if all you're writing is 'glue' code, then what you really care about is the results of the code you're gluing together, and how to pass those results about in a way that each object can understand. And that's what shell scripting is for. - DeletedUser, on 10/12/2007, -9/+9I thought Linux shell scripting was easy until I tried Powershell... For a Microsoft product, it really is amazing.
- bmartin, on 10/12/2007, -0/+0I like how it says "use chmod 744 ..." to make the file executable... for the owner, maybe.
- ZetaEta, on 10/12/2007, -3/+3Most Unix and Linux variants use an entry in the passwd database to know what shell to use, while others use a line in a file named .login or .shell. There are Perl scripts which can be used to instantiate Perl as your shell (and one or two for Python, as well). ksh is one of the most unusual shells in terms of scripting quirks (but it's also one of the more powerful common shells), while bash is Red Hat's preferred shell. Some people even use Emacs as their shell!
As a note, .rcsh is a shell script executed when most 'sh' type shells are instantiated. I use .rcsh and .login to set up my preferred command aliases, rather than making them global. - nailer, on 10/12/2007, -3/+3Don't understand why people are digging down DeletedUser
I'm a Linux guy and Powershell is really cool - the object based aproach neatly seperates content from presentation. So unlike shell scripting where you're forever dealing with minor variations in the output of commands (differences in ifcfg etc between platforms, or maybe a long value pushes out the normal bytes of output), you're actually dealing with data more than hacking text.
I want a Linux port of the concept! - b7illsmith, on 10/12/2007, -3/+1I sometimes edit shell scripts, but I seldom write them. For my scripting needs, I use Perl.
- t00pl, on 10/12/2007, -4/+1Easy and vi doesn't match! Damn, you it's 21st century !!!
- daven1986, on 10/12/2007, -8/+3a lot of it looks similar to perl, nice guide though. i can see this becoming useful when i switch.
- netzdamon, on 10/12/2007, -10/+3are you kidding me?
What is Digg?