0
echo 'Working Space'
read dirname #directory 
if [ -n "$dirname" ]

...

fi
for dir in *
do

newname=`echo $dir | tr "[a-z] [A-Z]" "[A-Z] [a-z]"` 
mv $dir $newname 
done
~                                                                                                                                                    
~                                                                                                                                                    
~                                                                                                                                                    
~                                                                                                                                                    
~                                                                                                                                                    
~                                                                                                                                                 

I'm new to shell script. I have some problem with command echo. It's my school assignment and my assistant gave me the template code. However the first line which contains command 'echo' he gave got me an error.

./utol.sh: line 1: echo: command not found

I checked path /bin whether it contains echo command, and simple command like 'echo hi' works well in my terminal, so I'm guessing this problem is not related with echo itself but other lines.

Can anybody help me? Thanks.

  • 1
    Does this answer your question? [Bash script prints "Command Not Found" on empty lines](https://stackoverflow.com/questions/7362504/bash-script-prints-command-not-found-on-empty-lines) – Nico Haase Sep 09 '21 at 09:14

0 Answers0