[cs631apue] About the test script

Yuxi Wang ywang286 at stevens.edu
Tue Oct 15 13:25:36 EDT 2019


Oh, I made it run. I save the sh file as CRLF style.

Sorry for disturbing.


________________________________
From: cs631apue-bounces at lists.stevens.edu <cs631apue-bounces at lists.stevens.edu> on behalf of Yuxi Wang <ywang286 at stevens.edu>
Sent: Tuesday, October 15, 2019 1:12:05 PM
To: cs631apue at lists.stevens.edu <cs631apue at lists.stevens.edu>
Subject: [cs631apue] About the test script

Hello,

When I run the test script, the shell shows like this. Could someone tell me why it is like this?

Thank you.

Yuxi Wang

apue# sh -v lstest.sh
#! /bin/sh
#set -e

: not found
COMMANDS="./ls
./ls -l
./ls -la
./ls -lai
./ls -lairt
./ls -lairtus
./ls -d
./ls -d .
./ls -d . .. /
./ls -n /home
./ls -l /dev
./ls -lsh
./ls -lF
./ls -A ~jschauma/apue/ls-test
./ls -w ~jschauma/apue/ls-test
./ls ~jschauma/apue/ls-test | more
BLOCKSIZE=bacon ./ls -ls
BLOCKSIZE=0 ./ls -ls
BLOCKSIZE=2048 ./ls -ls
BLOCKSIZE=-50 ./ls -ls
BLOCKSIZE=50 ./ls -ls
TZ=PST8PDT ./ls -lc
TZ=bacon ./ls -lc
./ls -lks
./ls / /tmp ~ .
./ls -?
./ls /does/not/exit
./ls /nowhere"

: not found
IFS="
"

: not found
for c in ${COMMANDS}; do
" unexpected6: Syntax error: Word "do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20191015/009cf76e/attachment.html>


More information about the cs631apue mailing list