我以前从未使用bash,有人能告诉我如何组合这两个命令吗?(只打开游戏一次)
改变语言,打开游戏。
open /Applications/League\ of\ Legends.app --args --locale=zh_CN添加语音聊天,并打开游戏。
cd '/Applications/League of Legends.app/Contents/LoL/'
./LeagueClient.app/Contents/MacOS/LeagueClient感谢你的帮助
发布于 2022-09-16 12:07:13
您可以使用&&在csh、zsh和bash中。
open /Applications/League\ of\ Legends.app --args --locale=zh_CN && (cd '/Applications/League of Legends.app/Contents/LoL/'; ./LeagueClient.app/Contents/MacOS/LeagueClient)或者,您可以创建一个脚本:
% mkdir ~/bin
mkdir: /Users/risner/bin: File exists
% touch ~/bin/lol.sh
% open -e ~/bin/lol.sh
% chmod +x ~/bin/lol.sh%表示来自shell的命令提示符。
然后将其放入TextEdit打开的文件中:
#!/bin/sh
open /Applications/League\ of\ Legends.app --args --locale=zh_CN && \
( \
cd '/Applications/League of Legends.app/Contents/LoL/'; \
./LeagueClient.app/Contents/MacOS/LeagueClient \
)脚本打开应用程序,将区域设置传递给应用程序。如果成功的话,打开联盟的客户。
https://stackoverflow.com/questions/73509561
复制相似问题