How many shell scripting languages are there for linux?

by on June 22, 2010

Q: I’d like to understand the difference between awk script and bash script in linux. Do they really have a different semantic? (I could also misunderstand…but they figure to be different just look at the for or at the if statement). Anyway how many kind of script are there? And (It should be only one question…) what is better (if anyone can say it)

Thanks for the time 🙂


2 Responses to “How many shell scripting languages are there for linux?”
  1.  

    I am going to assume you mean shell scripting languages although technically any script language can be used to script stuff in shells meaning even languages that are considered “programming” languages like Perl, php, and python are often used as shell scripting languages.

    To narrow things down though lets just use languages that only work in shells like bash scripting, awk, etc although I guess technically you might be able to get them to run outside of the shell but we are just opening too many cans of worms here.

    So the first question was do the languages have different semantics and the answer is yes. Most languages do their conditional statements a little different otherwise they would be the same language just using a different interpreter.

    The answer to which question is best is really based on what you are trying to do. You have to think of languages like a toolbox. If you need to hang a picture then the best tool in your toolbox is probably a hammer to hammer in the nail but in theory you could use almost anything to hammer in the nail, even a rock, but the best thing to use would be a hammer because it was created for hamming in nails.

    The same is true for scripting and programming languages in that they are created to making solving certain problems easier. So the best scripting language depends entirely on what you are doing. Some make it really easy to parse text files while others make it really easy to do other tasks.

    Unfortunately it seems like a lot of people learn just one language and they just use that for everything and I personally think it makes things a little more difficult. I like to try to use the right tool for the job and find that when possible it does make my life considerably easier.

     
  2.  

    Hi Matt,
    this is a really interesting answer.
    tanks a lot !