[Tutor] self installing, or lifting by one's own bootstraps.

Sean 'Shaleh' Perry shalehperry@attbi.com
Sat, 5 Oct 2002 22:10:49 -0700


On Saturday 05 October 2002 21:41, Kirk Bailey wrote:
> But all the FreeBSD world, and even linux, mounts the sh shell. So ther=
e's
> the tool. But I have a minor problem, a for loop is barking at me.
>
> for FILE in `ls -1 TL*.p`
>         cat /tmp/python $FILE > ./$FILEy
>
> it gets me some rather cryptic messages: (the first 3 lines are normal
> output to the user.)
> Item #6:
> Add the interpeter shebang to each TLscript source file,
> creating the final interpeted executable script.
> ./testscript: 66: Syntax error: word unexpected
> ns#
>
> Any shell script  mavens care to graciously give me a clue?
>

You know Kirk, it would not hurt you to read a tutorial (or man page) now=
 and=20
then (-:

for FILE in `ls -1 *`;
do
    echo ${FILE} # braces are for safer variable expansion
done

The shell is not Python, it has its own rules.

Also, a common idiom for generated files is to name the input foo.in.  So=
 in=20
your case you would have TLfoo.py.in --> TLfoo.py.