Question requirements Write a greeting program that can output greetings to the user according to the current time of the system when it is executed. Assume that from midnight to noon is morning, n
Category: OS
Operating System (Operating System, referred to as OS) is a computer program that manages and controls computer hardware and software resources. It is the most basic system software that runs directly on the “bare metal”. Any other software must be supported by the operating system to run .
Shell read-only variable
test.sh:
#!/bin/bash
myUrl=”http://www.google.com span>”
readonly myUrl
myUrl=”http://www.runoob.com span>” Output
bogon:Desktop macname $ ./test.sh
./test.sh: line 4: myUrl: reado
Record the special variables in the shell script
1. Special location variables
About the above related variables introduction , You can also refer to the man manual, execute the command “man bash”, and then search for the keyword “Special P
Regular expression – how to delete duplicate characters, but leave two?
If there are more than 2 characters
“Hiiiiiii
My friend!!!!!!!”
I need to reduce to
“Fei Yichuan
My friend!!”
Please note that in my language, there are many double-character words.
T
Shell – interactive input
Interactive input and for statement (8-15)
Interactive input
1, read Usage: The read command can define multiple variable values at the same time, and the input content can be used as
VIM configuration
Detect installed vim
rpm -qa | grep vi< span style="color: #000000; font-size: 16px;"> Install vim yum -y install vim-enhanced
Replace with vimvi
vi ~/.bashrc #Need to restart or use source to r
My computer thinks Signed Int is less than -1?
See the answer in English> Why is (sizeof(int)> -1) false?
#include
int main(void)
{
printf(“%d”, sizeof(signed int)> -1);
return 0;
} The result is 0(FALSE).
How could this happen?
I am
Bash – single quotes of characters AWK scan string
I have a line and I want to know if there are any embedded single quote characters in it. Using awk, I tried several variations
badix = index($0,”