当前位置:网站首页>命令输出给变量
命令输出给变量
2022-08-11 05:33:00 【macob】
有两种方法可以将命令输出赋给变量:
反引号字符 `
testing='date'
$()格式
testing=$(date)
#!/bin/bash
# copy the /usr/bin directory listing to a log file
today=$(date +%y%m%d%k%M%S)
ls /usr/bin -al > log.$today
边栏推荐
- 无胁科技-TVD每日漏洞情报-2022-8-2
- window10吐槽
- VMware workstation 16 安装与配置
- Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-28
- CLUSTER DAY04(块存储应用案例 、 分布式文件系统 、 对象存储)
- 解决win10安装portal v13/v15要求反复重启问题。
- VMware workstation 16 installation and configuration
- Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-19
- (3) Software testing theory (understanding the knowledge of software defects)
- SECURITY DAY02 (Zabbix alarm mechanism, Zabbix advanced operation and monitoring case)
猜你喜欢
SECURITY DAY04( Prometheus服务器 、 Prometheus被监控端 、 Grafana 、 监控数据库)
SSH服务详解
CLUSTER DAY03( Ceph概述 、 部署Ceph集群 、 Ceph块存储)
lvm 多盘挂载,合并使用
vi display line number in buildroot embedded file system
Solve win10 installed portal v13 / v15 asked repeatedly to restart problem.
ETCD cluster fault emergency recovery - to recover from the snapshot
FusionCompute8.0.0实验(1)CNA及VRM安装
AUTOMATION DAY07( Ansible Vault 、 普通用户使用ansible)
Arcgis小工具_实现重叠分析
随机推荐
SECURITY DAY01(监控概述 、 Zabbix基础 、 Zabbix监控服 )
CLUSTER DAY03( Ceph概述 、 部署Ceph集群 、 Ceph块存储)
HPC平台搭建
SSH服务详解
ansible批量安装zabbix-agent
记录一个刚写的Makefile
ETCD单节点故障应急恢复
无胁科技-TVD每日漏洞情报-2022-7-18
Record a Makefile just written
处理eking.Devos勒索病毒防范解密恢复操作攻略
ETCD容器化搭建集群
无胁科技-TVD每日漏洞情报-2022-7-21
ovnif摄像头修改ip
CLUSTER DAY01(集群及LVS简介 、 LVS-NAT集群 、 LVS-DR集群)
What should I do if I forget the user password in MySQL?
FusionCompute8.0.0实验(0)CNA及VRM安装(2280v2)
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-22
Project Notes - Random 2
C语言两百题(0基础持续更新)(1~5)
SECURITY DAY04( Prometheus服务器 、 Prometheus被监控端 、 Grafana 、 监控数据库)