Macros, scripts, and programs


Practical definition / general rule of thumb
  • macros:
    • limited to current or default shell

    • perform the same action(s) many times

    • no flow control (i.e., no conditional execution)

    • no passing of parameters

    • no variable manipulation

    
        Example:
    
        %>  cat macro
        \cp −p im001.fits NGC3710_B.fits
        \cp −p im002.fits NGC3710_V.fits
        \cp −p im003.fits NGC3710_R.fits
        ...
    
        %>  source macro
    
        or:
    
        %>  chmod +x macro
        %>  macro