我正在学习 C 作为第一编程语言。我输入了以下源代码:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,s,d;
printf("type the number which you want to add.\n\n");
scanf("%d %d",&a,&s);
d=a+s;
printf("addition is %d\n\n\n",d);
system("pause");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我在 Windows 7 和 Ubuntu 中使用 Code::blocks 在 Code::blocks 中输入了相同的源代码,但在 Ubuntu 中,当我运行它时,最后它说
sh: 1: pause: not found
Run Code Online (Sandbox Code Playgroud)
/etc/apt/sources.list.d 包含
jonathonf-ubuntu-python-3_6-xenial.list
jonathonf-ubuntu-python-3_6-xenial.list.save
notepadqq-team-ubuntu-notepadqq-xenial.list
notepadqq-team-ubuntu-notepadqq-xenial.list.save
oracle-vbox.list
oracle-vbox.list.save
owncloud.list
owncloud.list.save
ubuntu-wine-ubuntu-ppa-xenial.list
ubuntu-wine-ubuntu-ppa-xenial.list.save
webcamstudio-ubuntu-webcamstudio-stable-xenial.list
webcamstudio-ubuntu-webcamstudio-stable-xenial.list.save
webupd8team-ubuntu-atom-xenial.list
webupd8team-ubuntu-atom-xenial.list.save
webupd8team-ubuntu-tor-browser-xenial.list
webupd8team-ubuntu-tor-browser-xenial.list.save
yannubuntu-ubuntu-boot-repair-xenial.list
yannubuntu-ubuntu-boot-repair-xenial.list.save
Run Code Online (Sandbox Code Playgroud) 有一个选项可用于grep -f MY_FILE让它搜索从文件中获取的模式,而不是直接在命令行上指定。
是否可以选择对find命令执行类似操作并让它读取模式以从输入文件中进行搜索?
我可以免费下载 Ubuntu 还是必须支付 20 美元?
http://www.ubuntu.com/download/desktop/contribute/?version=15.10&architecture=amd64Not now, take me to the download上的选项(链接在示例中编辑)不会将我带到下载页面。
我在 linode 上的服务器 VPS 上运行最新的 Ubuntu,安装 cronkeep 时出现此错误
哦,啪!
at 在此系统上不可用。每当您点击“运行”时,CronKeep 都会在内部使用这个巧妙的命令来独立于您的 Web 服务器运行作业。这意味着您可以重新启动您的 Web 服务器并仍然让进程在后台运行。
这是命令的原始输出,可以帮助您进一步调试:sh: 1: at: not found
有没有被调用的工具,at或者在 C 编译器上有什么可用的东西?。
当我尝试gfortran在终端中运行时,出现以下错误:
$ gfortran
gfortran: fatal error: no input files
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
为什么会这样?我究竟做错了什么?
我想使用if语句比较 Bash 中的字符串,但它不起作用:
#!/bin/bash
os=`lsb_release -r | sed 's/.*://'`
echo $os
if [ $os="16.04" ]
then
echo "g"
elif [ $os="14.04" ]
then
echo "b"
else
echo "c"
fi
Run Code Online (Sandbox Code Playgroud) command-line ×5
apt ×1
at-command ×1
bash ×1
c ×1
canonical ×1
cron ×1
downloads ×1
find ×1
fortran ×1
ppa ×1
programming ×1
purchase ×1
server ×1