我正在尝试在 bash 函数中使用 ls 、 cat 等命令
Report() { ls $1 | sort -u } Report()
当我运行该函数时,出现 ls: command not found 错误
是否无法在 bash 函数中使用 bash 命令?
我可以看到函数内部仅使用 echo 的示例
在 bash 中调用函数时,不应使用括号
Report() { ls $1 | sort -u }; Report;