Detailed explanation of daily_routine example code in Linux

Detailed explanation of daily_routine example code in Linux

First look at the example code:

#/bin/bash


cal

date -u

echo "Hello, welcome ${LOGNAME}! A full day has begun!"


read -p "input your password!" pwd

if test $pwd == "123"
then
    echo "Your login sucessfully!"
    for file in /tmp/*
    do
        echo $file
    done
else
    echo "Deny logon"
fi

cal print calendar

date -u displays or sets the global time (Greenwich Mean Time)

${LOGNAME} Current logged in user

The above examples are very simple, you can try to test them. Thank you for your learning and support for 123WORDPRESS.COM.

<<:  MySQL 5.7.21 decompressed version of the tutorial to restore data through the historical data directory

>>:  Detailed explanation of using Docker to build externally accessible MySQL

Recommend

Detailed explanation of some settings for Table adaptation and overflow

1. Two properties of table reset: ①border-collaps...

Using Openlayer in Vue to realize loading animation effect

Note: You cannot use scoped animations! ! ! ! via...

Explanation of several ways to run Tomcat under Linux

Starting and shutting down Tomcat under Linux In ...

Complete steps for Docker to pull images

1. Docker pull pulls the image When using $ docke...

Analysis of the methods of visual structure layout design for children's websites

1. Warm and gentle Related address: http://www.web...

React implements infinite loop scrolling information

This article shares the specific code of react to...

Detailed explanation of the application of CSS Sprite

CSS Sprite, also known as CSS Sprite, is an image...

Detailed tutorial for installing MySQL 8.0.11 compressed version under win10

After reinstalling my computer recently, I downlo...

Getting Started: A brief introduction to HTML's basic tags and attributes

HTML is made up of tags and attributes, which are...

Use Docker to build a Git image using the clone repository

Overview I have been using Docker for more than a...

Detailed explanation of the core concepts and basic usage of Vuex

Table of contents introduce start Install ① Direc...

Implementation of JavaScript downloading linked images and uploading them

Since we are going to upload pictures, the first ...

WeChat Mini Programs Implement Star Rating

This article shares the specific code for WeChat ...