Linux Basics-13, command replacement $ ()

Source: Internet
Author: User

[[email protected] ~]# echo It is the time $ (clock)

It is the time November 10, 2016 Thursday 18:20 38 sec -0.327027 seconds


Command substitution

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt

[email protected] ~]# LL./

Total Dosage 44


-rw-r--r--. 1 root root 0 November 10 14:34 201711201500

-RW-------. 1 root root 1367 July 00:30 anaconda-ks.cfg

-rw-r--r--. 1 root root 0 November 18:26 file-2016-11-10-18-26-04.txt

-rw-r--r--. 1 root root 0 November 18:26 file-2016-11-10-18-26-05.txt

-rw-r--r--. 1 root root 0 November 18:26 file-2016-11-10-18-26-06.txt

-rw-r--r--. 1 root root 0 November 18:26 file-2016-11-10-18-26-07.txt

-rw-r--r--. 1 root root 0 November 18:26 file-2016-11-10-18-26-08.txt

-rw-r--r--. 1 root root 0 November 18:26 file-2016-11-10-18-26-09.txt

-rw-r--r--. 1 root root 0 November 18:25 file-.txt

-rw-r--r--. 1 root root 27828 July 00:30 Install.log

-rw-r--r--. 1 root root 7572 July 00:28 install.log.syslog


This article is from the "James Zhan Linux Advanced ops" blog, so be sure to keep this source http://jameszhan.blog.51cto.com/10980469/1875542

Linux Basics-13, command replacement $ ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.