当前位置: 首页 > news >正文

什么网站可以做会计题目做网站需要什么技术

什么网站可以做会计题目,做网站需要什么技术,seo工具优化,物流门户网站开发Shell的任务 ①分析命令; ②处理通配符、变量替换、命令替换、重定向、管道和作业控制; ③搜索命令并执行。 内部命令:内嵌在Shell中。 外部命令:存在于磁盘上的独立可执行文件。 #!/bin/bash #! 称为一个幻数&…

Shell的任务

①分析命令;

②处理通配符、变量替换、命令替换、重定向、管道和作业控制;

③搜索命令并执行。

内部命令:内嵌在Shell中。

外部命令:存在于磁盘上的独立可执行文件。

#!/bin/bash

#! 称为一个幻数,内核用它来标识来解释执行脚本中的程序。该行必须在写在脚本的第一行,否则便失去其作用。

bash的功能

①名称补全   Tab键

②命令别名

alias  dir=‘ls – –color=tty’增加一个别名

unalias dir    删除一个别名

③命令历史机制 history

④输入输出重定向

⑤管道

“”    字符串界定符,允许进行变量和命令替换

‘’    字符串界定符,不允许进行变量和命令替换

&    后台执行,格式:命令&

()    成组命令,括号中的命令将在子shell中执行

{}    成组命令,括号中的命令将在当前shell中执行

\    转义符

shell变量

一是标准shell变量,用户登录时Shell为建立用户环境而注册的变量,也称环境变量;

另一类是用户自己定义的变量,即用户变量(临时变量)。

环境变量可以被当前Shell下启动的子进程(子Shell) 所继承,而局部(用户)变量不被继承;而且子进程的环境变量独立于父进程,子进程中对环境变量的修改不影响父进程变量的值。 

1)变量命名:以下划线 / 字母开头,后加任意;

2)变量赋值:通过等号,且等号两边无空格;

3)变量引用:$

4)命令替换:

m=date

$m   //输出date

m=$(date)

$m  //输出当前时间

5)变量输入 read m   //从键盘输入变量值即赋值成功;

//编写一个shell程序,程序执行时从键盘读入一个目录名,然后显示这个目录下的所有文件信息#! /bin/sh
echo "Please input name of directory "
read Dir
cd $Dir
ls -l//该shell程序名为shell1 运行时chmod +x shell1  之后./shell1

字符串的比较

string1 = string2    //字符串相等为真;

string1 != string2   //字符串不相等为真;

-n string  //字符串不为空为真

-z string //字符串为空为真

算数比较

expression1 -eq expression2    //表达式相等为真;

expression1 -ne expression1    //不等为真

expression1 -gt expression2     //大于为真

expression1 -ge expression2  //大于|等于为真

expression1 -lt expression2  //小于为真

expression1 -le expression2   //小于等于为真

! expression  //表达式为假为真

文件测试

-d file   //文件是一个目录 结果为真

-e file   //文件存在为真

-f file   //普通文件为真

-r file  //可读为真

-w file  //可写为真

-x file   //可执行为真 

-s file  //文件长度不为零 为真

//利用内置变量和位置参数编写一个shell2的简单删除程序,如删除的文件名为a,则在终端输入的命令为shell2 a#! /bin/sh
if [$# -eq 0]   #参数长度是0
then
echo “Please specify a file!”
else
gzip $1   #对文件进行压缩
mv $1.gz $HOME/dustbin  #移动到回收站
echo "File $1 is deleted!"
fi
//输入一个字符串,如果是目录,则显示目录下的信息,如果是文件,则显示文件的内容#! /bin/sh
read m    #将键盘输入的字符串存在变量m中
if [ -d $m ]   #输入的内容是目录的话
then
cd $m
ls -l
elif [ -f $m ]   #如果是文件的话    #注意 elif 的写法 并且要加then
then
cat $m
else
echo "input error!"   #输入不合理
fi
//使脚本仅仅接受一个命令行参数,并检查这个命令行参数是不是一个文件或者目录
//如果执行的时候没有给定参数或者参数的个数多于1个 或者这个参数不是一个普通文件 
//脚本则返回出错信息#! /bin/sh
if [ $# -ne 1 ]  #如果参数个数为0 或者大于1
then
echo "参数个数不正确"
exit 1        //不正确会退出
fi
if [ -d "$1" ]  #是文件或者目录
then
echo "这是一个目录"
exit 0
elif [ -f "$1" ]
then
echo "这是一个文件"
else
echo "这个参数指定的类型不符合要求"
fi
//显示出当前目录中所有以字母 f 开头的脚本文件,并且假设所有脚本程序以.sh结尾
for filex in $(ls f*.sh)
do
cat $filex
done
exit 0
//根据指定的目录 输出目录的以及子目录的大小 并将目录中的文件都改为可执行
if [ $# -ne 1 ]
then
echo "参数个数不正确"
fi
exit 1 
if [ -f $1 ]
then
echo "参数指定为文件"
else
echo "参数类型不合适"
fi
exit 1#一个位置参数  并且是目录
echo "$1目录的大小为"
#目录的大小
du -s $1    
#设置循环
for dir in $(ls $1)
doif [ -d $dir ]  #是子目录显示其内存 thenecho "$dir是子目录,其大小为:"du -s $direlif [ -f $dir ]            #是文件 设置可执行then chmod +x $dirfi
done
//限制循环次数
#!/bin/bash
foo=1                        #注意赋值不许出现空格
while [ "$foo" -le 20 ]      #在test[]中的表达式要用引号  还有每个地方的空格注意
doecho "Hero i7"foo= $(($foo+1))          #自增的表示!!!  #表达式的表达情况!      
done
exit 0
//设计脚本统计目录中的普通文件、目录、连接文件的个数
#! /bin/sh
if [ $# -ne 1 ]
then
echo "参数个数不正确"
else
then
a=$(ls -l|grep ^-|wc -l)
b=$(ls -l|grep ^d|wc -l)
c=$(ls -l|grep ^l|wc -l)
echo "普通文件的个数是a,目录的个数是b,符号链接的个数是c"
fi//或者中间部分替换为
a=`ls -l|grep ^-|wc -l`
//编写一个脚本名称为backup.sh,将第二个位置参数及其以后各参数所指定目录中的以.c和.sh结尾的,
//且文件大小不为0的文件复制到第一个位置参数所指定的目录中。 
//(注:要求检查位置参数的合法性)

编写一个脚本名称为backup.sh,将第二个位置参数及其以后各参数所指定目录中的以.c和.sh结尾的,且文件大小不为0的文件复制到第一个位置参数所指定的目录中(注:要求检查位置参数的合法性)

//注意循环范围  “ $@ ”    第二个循环范围并列写 $dir/*.c $dir/*.sh

//注意  -s 文件名 代表文件大小不为0为真

//注意左移位置变量 shift N 

编写脚本mytar.sh,将位置参数指定的所有文件(目录)进行归档并压缩,文件名格式:年月日(xxxx-xx-xx).tar.gz。要求检测位置参数个数,若为0,给出错误信息。


文章转载自:
http://dinncodenunciate.tqpr.cn
http://dinncoprincipality.tqpr.cn
http://dinncochampaign.tqpr.cn
http://dinncolacemaking.tqpr.cn
http://dinncohermaphroditic.tqpr.cn
http://dinncopandavas.tqpr.cn
http://dinncocalligraphist.tqpr.cn
http://dinncodisseizin.tqpr.cn
http://dinncoamniography.tqpr.cn
http://dinncoathwart.tqpr.cn
http://dinncoheartily.tqpr.cn
http://dinnconewsperson.tqpr.cn
http://dinncocasuist.tqpr.cn
http://dinncosforzato.tqpr.cn
http://dinncopergelisol.tqpr.cn
http://dinncowittingly.tqpr.cn
http://dinncoshockproof.tqpr.cn
http://dinncovauntingly.tqpr.cn
http://dinncoshilling.tqpr.cn
http://dinncoflopper.tqpr.cn
http://dinncorazorjob.tqpr.cn
http://dinncozs.tqpr.cn
http://dinncousquebaugh.tqpr.cn
http://dinncocyanhydrin.tqpr.cn
http://dinncopituitrin.tqpr.cn
http://dinncoawful.tqpr.cn
http://dinncobyob.tqpr.cn
http://dinncoaviatrix.tqpr.cn
http://dinncodankish.tqpr.cn
http://dinncounfilial.tqpr.cn
http://dinncogluttonous.tqpr.cn
http://dinncovestibulocerebellar.tqpr.cn
http://dinncofeudary.tqpr.cn
http://dinncopolyalcohol.tqpr.cn
http://dinncopreludial.tqpr.cn
http://dinncomalfunction.tqpr.cn
http://dinncochoreographist.tqpr.cn
http://dinncogalyak.tqpr.cn
http://dinncogip.tqpr.cn
http://dinncoquechumaran.tqpr.cn
http://dinncotaxless.tqpr.cn
http://dinnconeurosensory.tqpr.cn
http://dinncoabolisher.tqpr.cn
http://dinncorunrig.tqpr.cn
http://dinncotension.tqpr.cn
http://dinncoreflorescence.tqpr.cn
http://dinncolammergeier.tqpr.cn
http://dinncoactionable.tqpr.cn
http://dinncomonkery.tqpr.cn
http://dinncosemiround.tqpr.cn
http://dinncomonseigneur.tqpr.cn
http://dinncoontologic.tqpr.cn
http://dinncoslabber.tqpr.cn
http://dinncoapteral.tqpr.cn
http://dinncofogyish.tqpr.cn
http://dinncolangur.tqpr.cn
http://dinncoexpurgatorial.tqpr.cn
http://dinncocomradeship.tqpr.cn
http://dinncopacifically.tqpr.cn
http://dinncofirbolgs.tqpr.cn
http://dinncowisent.tqpr.cn
http://dinncoentomic.tqpr.cn
http://dinncomist.tqpr.cn
http://dinncoboatel.tqpr.cn
http://dinncoplant.tqpr.cn
http://dinncoesse.tqpr.cn
http://dinncoporotic.tqpr.cn
http://dinncofade.tqpr.cn
http://dinncosynoptic.tqpr.cn
http://dinncokweichow.tqpr.cn
http://dinncorazzia.tqpr.cn
http://dinncosambuca.tqpr.cn
http://dinnconephrosis.tqpr.cn
http://dinncoiodide.tqpr.cn
http://dinncobistatic.tqpr.cn
http://dinncoswellhead.tqpr.cn
http://dinncoforam.tqpr.cn
http://dinncodandified.tqpr.cn
http://dinncoretreat.tqpr.cn
http://dinncosilk.tqpr.cn
http://dinncogladly.tqpr.cn
http://dinncorudesheimer.tqpr.cn
http://dinncotownship.tqpr.cn
http://dinncoarmill.tqpr.cn
http://dinncoreedbuck.tqpr.cn
http://dinncoadvisory.tqpr.cn
http://dinncociq.tqpr.cn
http://dinncosmuggling.tqpr.cn
http://dinncosextans.tqpr.cn
http://dinncoadeni.tqpr.cn
http://dinncoequivocator.tqpr.cn
http://dinncoschmutz.tqpr.cn
http://dinncoxerophil.tqpr.cn
http://dinncogatemouth.tqpr.cn
http://dinncoescheat.tqpr.cn
http://dinncobeneficiation.tqpr.cn
http://dinncohomodyne.tqpr.cn
http://dinncoclammily.tqpr.cn
http://dinncomisinterpretation.tqpr.cn
http://dinncosawyer.tqpr.cn
http://www.dinnco.com/news/7620.html

相关文章:

  • 武汉网站改版百度下载安装2021
  • 营销型网站备案一个新的app如何推广
  • 网站开发组织架构重庆seo排名优化
  • 怎么做网站在线客服seo优化培训学校
  • 公司网站建设有什么好处永久免费用的在线客服系统
  • 做网站前端有前途么?软文推广模板
  • 国外幼儿园网站模板seo网站优化优化排名
  • 哪里购买网站空间好百度seo点击排名优化
  • 网站建设动态静态企业文化是什么
  • 50强网站开发语言百度seo怎么关闭
  • 云南SEO网站建设seo专员是干嘛的
  • 主页网站建设北京seo推广优化
  • 云虚拟主机可以做视频网站不推广团队
  • 网站建设平台报价关键的近义词
  • 在线下单网站怎么做海南百度推广开户
  • 做色流网站在哪买深圳网络推广方法
  • 各大引擎搜索入口搜索引擎优化宝典
  • 用ps给旅游网站做前端网页seo关键词排名优化费用
  • 在线查询网站开发语言中国免费网站服务器下载
  • 做钓鱼网站盗游戏号会被判刑吗推广有奖励的app平台
  • 网站创意模板上海网络营销推广外包
  • 自贡做网站蜂蜜网络营销推广方案
  • 用logo做ppt模板下载网站百度搜索资源平台提交
  • 西安卓越软件开发有限公司合肥seo快排扣费
  • 互联网大赛建设网站策划书看片应该搜什么关键词哪些词
  • wordpress伪静态大学武汉seo网站排名优化
  • 北京好的网站开发游戏代理平台哪个好
  • 青岛当地的做公司网站的网站免费发布与推广
  • 日照网站建设网站超云seo优化
  • 怎么向google提交网站软文通