ZKX's LAB

centos脚本命令大全 centos自动删除三天前文件的脚本和自动进入指定目录运行命令

2021-04-28知识5

centos shell脚本(批量操作) bin/bashHOSTNAME=\"192.168.111.84\"#数据库信息PORT=\"3306USERNAME=\"rootPASSWORD=\"DBNAME=\"test_db_test\"#数据库名称TABLENAME=\"test_table_test\"#数据库中表的名称

Linux centos shell脚本 while read webname;docd/home/wwwroot/$webnamewget http://www.baidu.com/web.zipwget http://www.baidu.com/uploads.zipunzip web.zipunzip uploads.ziprm-f web.ziprm-f uploads.zipdone

关于centos的命令和sh脚本的问题 source命令执行脚本,意味着在当前shell执行。对当前环境变量的值有影响。sh命令执行脚本,会在新建shell中执行。不会改变当前环境变量的值。

qrcode
访问手机版