Scripting advise
Hello everyone. I'm a little new to Linux but I have a basic programming background and would like to know which would be a preferred scripting language. Is python better or is bash scripting better?
Thanks |
bash is the (usual) cmd line shell language, so I'd start with that, to get familiar with Linux & scripting.
After that, there is range of languages you can look at. Try these for Linux/bash http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ |
Quote:
|
Indeed BASH is a must.
BASH intros: http://www.gnu.org/software/bash/man...ode/index.html http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html http://www.tldp.org/LDP/Bash-Beginne...tml/index.html BASH scripting guides: http://mywiki.wooledge.org/BashGuide http://mywiki.wooledge.org/BashFAQ http://mywiki.wooledge.org/BashPitfalls # these are must reads so do read them! Common questions / problems: http://mywiki.wooledge.org/ParsingLs http://mywiki.wooledge.orgDontReadLinesWithFor http://mywiki.wooledge.org/UsingFind http://mywiki.wooledge.org/Arguments http://mywiki.wooledge.org/WordSplitting http://mywiki.wooledge.org/Quotes Also see: http://www.linuxquestions.org/questi...l-links-35334/ The Advanced BASH scripting guide: http://www.tldp.org/LDP/abs/html/ Bourne shell (compatibility): http://www.grymoire.com/Unix/Sh.html |
Bash can do many system/world-level solutions and is easy when a quick solution is needed. Please check Ruby as well.
|
Hi and welcome to LQ!
Bash, of course. |
The shell, be it BASH (Bourne Again Shell), ksh (KornShell), sh (the original shell program developed primarily by Stephen Bourne at Bell Labs for Unix), the C-Shell (developed at Berkeley) along with various flavors and variants are command and programming languages.
When you fire up a Linux system and log in, you're presented with a shell prompt (if the system starts at run level 3 (non-graphic); if it starts with GNOME, KDE, Xfce or some other window manager you need to open a terminal emulator to get a shell prompt. From that prompt, you can execute programs and utilities piping the output of one program into the input of another program as necessary or you can write a shell program ("script" isn't really correct, what you're actually doing is writing a shell program that you can save as a file, make it executable and then type its name to execute it) to perform useful work (hopefully!). Shell programming has grammar and syntax rules just like any programming language (C, FORTRAN, whatever). You may be surprised how many shell programs there are on your system; e.g., Code:
cd /usr/bin It's really a good idea, if you're serious about getting the most out of your system, to take the time to learn shell programming. At some point, you're going to hit a problem you need to solve and you won't be able to do it with some pre-built application -- if you know how to write a shell program, you can, typically, solve a problem without resorting to a higher-level programming language (not always, certainly, but more frequently than you might think). It's worth your time to learn. Hope this helps some. |
Thanks everyone. Having a feeling I am gonna enjoy being a member :)
|
thank you tronayne, those lines did help me, worth reading as same worth learning bash :)
|
All times are GMT -5. The time now is 04:24 PM. |