DEV Community

Discussion on: Shellscripting: Conditional Execution

Collapse
 
puritanic profile image
Darkø Tasevski

I guess that I need to state that the most of this stuff is intended for the bash shell. I don't know many people that use csh/tcsh anyway :/

Collapse
 
tux0r profile image
tux0r

That wasn't clear, especially after the first part which recommended to use #!/bin/sh...

Thread Thread
 
puritanic profile image
Darkø Tasevski

Gonna address that later, thanks for the advice! I've never used BSD nor csh before, so I'm not that familiar with differences between distros and shells, as I'm almost exclusively using bash/zsh for my job.

Thread Thread
 
tux0r profile image
tux0r

This table might help. The ksh (AIX/OpenBSD default shell) does not differ that much from POSIX, the csh does.

Thread Thread
 
ikirker profile image
Ian Kirker
  • sh: the basics, POSIX standard
  • ash: reimplementation of sh
  • dash: port of ash
  • ksh: extensions on top of sh
  • bash: massive extensions on top of sh (mostly a superset of ksh's)
  • zsh: massive extensions on top of sh but different ones to bash

  • csh: a completely different shell to sh, contemporary in origin, mostly different syntax

  • tcsh: extensions on top of csh

  • fish: a completely different shell again, cut-down syntax and features mostly targeted at interactive users

So, yeah, it's important to specify which shell you're targeting.

Thread Thread
 
puritanic profile image
Darkø Tasevski

Thanks for the info. I've updated the posts with shell reqs. 😊