./test.sh: line 6: addr: command not found
从书上看到一段代码,用来打印出当前目录下的文件名字,如下
Plain Text code?1234567 #!/bin/bash for file in $( * ) do echo "file: $i" done
但是一直有问题
./test.sh: line 6: addr: command not found
请大家指点
#!/bin/bash for file in * do echo "file: $i" done
或者
Plain Text code?#!/bin/bash for file in $(ls) do echo "file: $i" done