我如何执行shell文件?

问题描述 投票:0回答:4

我正在尝试在笔记本电脑上下载Whatsapp。我正在使用Ubuntu桌面软件。我从http://dl.google.com/android/android-sdk_r16-linux.tgz安装了Android Emulator我解压缩文件,打开文件夹,Android-sdk-linux,打开工具,现在我应该执行Android文件,我不知道该怎么做。谁能给我任何帮助?

好的,所以这就是我认为我应该做的:shell @ shell:〜$ cd桌面shell @ shell:〜/ Desktop $ ./android.sh bash:./ android.sh:没有这样的文件或目录

但那会发生......

android linux ubuntu execute whatsapp
4个回答
0
投票

首先使文件可执行

chmod +x filename.sh

然后用脚本启动脚本

./filename.sh

要么

/full/path/to/filename.sh

0
投票
sh filename.sh

要么

bash filename.sh

0
投票

使用以下命令在Ubuntu上安装WhatsApp:

wget https://www.thefanclub.co.za/sites/all/modules/pubdlcnt/pubdlcnt.php?file=https://www.thefanclub.co.za/sites/default/files/public/downloads/whatsapp-webapp_1.0_all.deb&nid=200 && sudo dpkg -i whatsapp-webapp_1.0_all.deb

然后输入密码并使用应用程序密钥打开WhatsApp。


0
投票

默认情况下,任何shell脚本的权限都是“-rw-rw-r--”首先我们需要使用“chmod命令”更改权限然后我们可以像运行C可执行代码一样运行shell脚本。

要调试shell脚本,我们需要使用“bash -x”选项运行shell脚本,如下所示:$ bash -x ./

© www.soinside.com 2019 - 2024. All rights reserved.