当前位置:网站首页>Shell string
Shell string
2022-07-25 03:48:00 【Ybc_ Jame】
Single quotation marks
- Any character in a single quotation mark will be output as is , Variables in a single quoted string are invalid ;
- A single quotation mark cannot appear in a single quotation mark string ( You can't escape a single quotation mark ), But in pairs , Use as string concatenation .
Double quotes
- You can have variables in double quotes
- Escape characters can appear in double quotes
yours="runoob"
strs="Hello,I know you are \"$yours\"!"
echo $strs
Concatenate characters ( Double quotes 、 Single quotation marks )
// Double quotes
name="runoob"
string="hello,"$name"!"
string_2="hello,${name} !"
echo $string $string_2
// Single quotation marks
name="runoob"
string='hello,'$name'!'
string_2='hello,${name} !'
echo $string $string_2
Get string length
string="abcd"
echo ${#string}
边栏推荐
- Localization distillation for dense object detection cvpr2022
- Wechat applet authorized login (including obtaining basic information and binding mobile number)
- Swagger key configuration items
- [Flink] rich function
- Codewars notes
- Interview question 05.06. integer conversion
- Analysis of browser working principle
- Machine learning notes - building a recommendation system (4) matrix decomposition for collaborative filtering
- Detailed explanation of three factory modes
- Machine learning exercise 8 - anomaly detection and recommendation system (collaborative filtering)
猜你喜欢

Moveit2 - 8. Motion planning API
![[leetcode medium] 34. Find the first and last positions of elements in the sorted array - array double pointer](/img/f0/e572fe077ddd51b9c160e3382b2a07.png)
[leetcode medium] 34. Find the first and last positions of elements in the sorted array - array double pointer

ES(8.1)认证题目

301. Delete invalid brackets

Emergency response stack

Customized view considerations

C language_ Defining structures and using variables

B. Almost Ternary Matrix

A 20 yuan facial cleanser sold tens of thousands in seven days. How did they do it?

Analysis of DNS domain name resolution process
随机推荐
B. Almost Ternary Matrix
Analysis of browser working principle
Interview question 05.06. integer conversion
What should testers do if they encounter a bug that is difficult to reproduce?
基于ABP实现DDD--领域逻辑和应用逻辑
Network security - comprehensive penetration test -cve-2018-10933-libssh maintain access
Fifth day of force deduction
Easyexcel sets the style of the last row [which can be expanded to each row]
[brother hero July training] day 19: binary tree
Time complexity and space complexity
Force deduction brush question 7. Integer inversion
Machine learning notes - building a recommendation system (4) matrix decomposition for collaborative filtering
Calculation method of confusion matrix
Image processing based on hog feature
Test question f: statistical submatrix
[file upload] parse text files and store them in batches through JDBC connection (dynamic table creation and dynamic storage)
Analysis of cascading relation operation examples of cascade
55k is stable, and the recommendation system will always drop God!
Uniapp picker select the effect demo of provinces and cities (finishing)
Unity: text input box for numerical judgment