我想写一个shell脚本,检查某个文件archived_sensor_data.json
是否存在,如果存在,就删除它。按照http://www.cyberciti.biz/tips/find-out-if-file-exists-with-conditional-expressions.html,我尝试了以下方法。
[-e archived_sensor_data.json] && rm archived_sensor_data.json
然而,这引发了一个错误
[-e: command not found
当我试图用./test_controller
命令来运行产生的test_controller
脚本时,却出现了错误。这段代码有什么问题?