今天编写shell脚本,执行时报错 原因是eof前面不能有空格或tab,否则会告警。 要以以下格式才行 function send { ftp -inv << eof open ip user $username $password dir cd mid pwd put $i dir bye eof ...
分类:
系统相关 时间:
2020-03-12 16:00:13
阅读次数:
72
程序调试阶段: 测试:找出程序的错误或缺陷 固化:让程序错误可重现 定位:确定相关代码行 纠正:修改代码 修正错误 验证:确定修改解决了问题 1 gcc -Wall -pedantic -ansi //gcc 编译 产生编译的警告信息 1取样法:在程序中添加printf等输出程序执行过程中的信息,程 ...
分类:
系统相关 时间:
2020-03-12 14:28:13
阅读次数:
76
比较两个数的大小,并从大到小进行排序 #include<stdio.h>int main(){ float a, b, t; scanf("%f%f", &a, &b); if (a>b) { t = b; //如果a大于b则进行交换 b = a; a = t; } printf("%f %f", ...
分类:
编程语言 时间:
2020-03-12 14:22:40
阅读次数:
49
(1)添加阿里docker源shell>wgethttps://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo-O/etc/yum.repos.d/docker-ce.repo(2)安装dockershell>yum-yinstalldocker-ceshell>docker-vshell>systemctl
分类:
其他好文 时间:
2020-03-12 09:33:00
阅读次数:
62
(1)首先要知道使用的Mac OS X是什么样的Shell,使用命令 echo $SHELL 如果输出的是:csh或者是tcsh,那么用的就是C Shell。 如果输出的是:bash,sh,zsh,那么用的可能就是Bourne Shell的一个变种。 Mac OS X 10.2之前默认的是C She ...
分类:
系统相关 时间:
2020-03-11 23:55:35
阅读次数:
117
最近由于工作原因,写了几个脚本,然后再linux中用定时任务去跑,记录一下shell脚本的学习过程吧! 首先知道shell第一行#!/bin/bash表示这是一个shell脚本,例如下面这个简单的脚本: #!/bin/bash #author:java小新人 #date:20200311 #desc ...
分类:
系统相关 时间:
2020-03-11 23:24:44
阅读次数:
77
1 #include<bits/stdc++.h> 2 3 using namespace std; 4 5 const int N = 1e5 + 5; 6 7 int f[N][30],a[N]; 8 9 int read(){ 10 int x=0,flag=1; 11 char ch=get ...
分类:
编程语言 时间:
2020-03-11 19:34:24
阅读次数:
71
C程序设计实验报告 姓名:黄静微 实验地点:家 实验时间:2019.03.10 实验项目 " " " " " " " " " " " " 一、实验目的与要求 1、字符与ASCII码 正确定义字符的类型 熟悉使用scanf()输入用户提供的数据 熟悉使用printf()输出变量 了解字符对应的ASCI ...
分类:
其他好文 时间:
2020-03-11 17:01:08
阅读次数:
51
#include<stdio.h>#include<stdlib.h>#include<time.h>voidmenu(){printf("***************************\n");printf("*******1.play*******\n");printf("*******0.exit*******\n");printf("******
分类:
编程语言 时间:
2020-03-11 15:44:00
阅读次数:
62