在Linux中运行cpp.sh,为什么说“未找到命令”?
有几种可能
1、你系统中没有安装bash
yum install bash
or
apt-get install bash
2、你运行的路径问题,请带上绝对路径
3、指定运行方式
bash cpp.sh
or
sh cpp.sh
or
./cpp.sh
3、运行权限,请用 sudo 模式运行
怎么创建.sh文件(linux)?
创建方法如下:
1、touch hello.sh
2、vim hello.sh 键入i 插入#!/bin/sh echo hello world; 键入: esc : wq
3、chmod 700 hello.sh 4.、执行./hello.sh
Linux下面如何运行SH文件?
命令行下面:1.chmod空格"+x"空格你的sh文件名(+x是一个整体,不要拆开)2.输入"./你的sh文件名"即可执行举例:1chmod+xhelloworld.sh2./helloworld.sh
sh函数表达式?
定义
y=shx是初等函数中的双曲正弦函数 shx=(e^x-e^-x)/2
性质
1、定义域:R
2.值域:(e^x+e^-x)/2≥2/2(√e^x*e^-x)=1
3.奇偶性:sh(-x)=/2=shx,奇函数.<----
shx=(e^x-e^-x)/2
sh(-x)=(e^-x-e^x)/2=-shx
因此函数shx为奇函数
运算公式及证明
sh(x+y)=shxchy+chxshy
证:shxchy+chxshy
=/(2*2)
=(e^x*e^y - e^-x*e^y + e^x*e^-y - e^-x*e^-y + e^x*e^y + e^-x*e^y - e^x*e^-y - e^-x*e^-y)/4
=(2e^x*e^y - 2e^-x*e^-y)/4
=/2
=sh(x+y)
sh(x-y)=shxchy-chxshy
证:sh(x-y)
=sh
=shxch(-y)+chxsh(-y)
=shxchy-chxshy