使用googletranslateshell并设置bash别名

使用googletranslateshell并设置bash别名,bash,Bash,我正在使用google translate shell CLI命令“trans'words'-speak”来显示翻译,并使用“trans'words'>>my_file”命令将翻译保存到文件中;当我试图通过“trans'words”-speak>>my_file”或“trans'words'\tee-a my_file”合并两个命令时,但不起作用!!请执行以下操作: 创建bin文件夹并为该脚本创建别名 mkdir bin cd bin nano script_name place comman

我正在使用google translate shell CLI命令“trans'words'-speak”来显示翻译,并使用“trans'words'>>my_file”命令将翻译保存到文件中;当我试图通过“trans'words”-speak>>my_file”或“trans'words'\tee-a my_file”合并两个命令时,但不起作用!!

请执行以下操作: 创建bin文件夹并为该脚本创建别名

mkdir bin
cd bin
nano script_name 
place commands in script => #!/bin/bash; /path/to/trans -speak | tee -a "$1"
chmod a+x script_name
set alias to script_name
登录并键入script\u name“/path/to/file”

“failed”不是一个足够的错误描述。