~/ learn/ comp-325/ cards/ The C Shell, and Scripting in Python 3
1 of 63

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/12991c80-2c3b-4a05-be66-17edbe6db71e/flashcard utf-8 LF