~/ learn/ comp-325/ cards/ The C shell dialect: same ideas, different language
1 of 9

The Bourne original — five lines to translate

The Bourne original — five lines to translate

Answer

#!/bin/sh count=0 export EDITOR=vi count=`expr $count + 1` echo "got # arguments; count is count"

One assignment verb, an explicit export, a forked `expr` for the arithmetic, and `$#` for the argument count. Every one of those four decisions is spelled differently in the C shell.

S&K 3e ch14 §14.3-14.5; csh(1) — see the warning callout for §14.4.2

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/3751d12d-0bdc-4b7f-b4a3-f97e5c74133b/flashcard utf-8 LF