csh versus bash for scripting

Discussion in 'macOS' started by ktwalker, Mar 8, 2012.

  1. ktwalker macrumors newbie

    Joined:
    Nov 30, 2004
    #1
    Folks,

    Not trying to start a war; I'm looking for facts that can easily be verified.

    Why is bash considered to be much better than csh for scripting? I have used csh all my life and the only thing that has annoyed me with it is the lack of floating point variables, which I found a workaround for using a trick. I do not use it for interactive scripting, but mostly to do batch processing and cron jobs.

    A colleague is using bash and expects me to take over a system using it. He would prefer to continue me using it, but my preference is to convert it all to csh. Can someone provide me good reasons why bash is better than csh for scripting?

    Thank you,
    Kris Walker
     
  2. r0k macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #2
    Have you tried putting #!/bin/sh at the top of every script? That makes the argument moot and your scripts always always always work but I must admit sh is a bit of a pain compared to csh and bash.
     

Share This Page