当前位置:网站首页>1. Shell echo > and echo > >
1. Shell echo > and echo > >
2022-07-18 22:34:00 【Big fish don't eat fish (wanna)】
echo -e "hello world\n" >> ./.git/config
# meaning : hold hello world And the newline symbol is appended to /.git/config This file
Look at this line of code :
echo Indicative output , amount to c In language printf function .
- No -e Option echo, take \n It is considered to be ordinary characters ;
- Used -e Option echo, Will \n Consider it a line break .
As for the back >> accord with , Look below .
The following is from :https://www.cnblogs.com/singeryoung/p/9554551.html
author : The sun, the moon and the stars
echo > Output redirection
echo>> Output additional redirection
echo hello A
The string hello A Output to the screen
echo hello A > tmp.txt
Redirect string output , The current directory does not have tmp.txt, Create tmp.txt, And output the string to tmp.txt In file
tmp.txt Content :hello A
echo hello B > tmp.txt
Redirect string output , The current directory exists tmp.txt, Will tmp.txt Replace the content with the output string
tmp.txt Content :hello B
echo hello C >> tmp.txt
Append the string output to redirection , The current directory exists tmp.txt, Will tmp.txt Append the output string after the content of
tmp.txt Content :hello B hello C
therefore , Meaning is : hold hello world And the newline symbol is appended to /.git/config This file .
边栏推荐
- 华为od-寻找相同子串
- 8080端口被占用怎么解决?Win11 8080端口被占用解决方法
- SFF1602-MHCHXM超快恢复二极管SFF1602
- J-dict-select-tag drop-down box failure solution
- Leetcode 1342. Number of operations to change the number to 0
- Voice conversion mainly involves technical records
- 创新中心首发!恭喜佳华物链云获MindSpore认证!
- Lingo solves the maximum (small) value of piecewise function
- Cmu15445 (fall 2019) project 4 - logging & Recovery details
- TSM, a cost-effective model, achieves 3D effect at the cost of 2D
猜你喜欢

pdf中的超链接,跳转之后,如何返回去? alt + ←

wordpress建立数据库连接时出错

The 100 billion yuan universe market is the new driving force of soul and Yingke

A New Optimizer Using Particle Swarm Theory

毕业季--数据库常见面试题

What did the new operator do? Interview

Error in WordPress establishing database connection

Arduino window garbled

Which kind of noise reduction Bluetooth headset is good? The most cost-effective active noise reduction Bluetooth headset

创新中心首发!恭喜佳华物链云获MindSpore认证!
随机推荐
看完这篇 教你玩转渗透测试靶机vulnhub——EvilBox-One
UCOS III learning notes (11) -- task semaphores and task message queues
【部署】Redis
毕业季--数据库常见面试题
活动回顾 | 与MindSpore深度畅聊:开源如何探索AI领域全场景
pdf中的超链接,跳转之后,如何返回去? alt + ←
The author of surging issued the pressure test results
Product of JS primes in Huawei computer test
After reading this article, I will teach you to play with vulnhub, the penetration test target machine -- evilbox one
狂神redis笔记01
开源十问, 社区新人快速上手指南
除了长安,这四个国产品牌也用“雷克萨斯脸”,中国设计倒退了?
DOM operation in reverse order, interview questions
Standard input / output stream
J-dict-select-tag drop-down box failure solution
【小程序项目开发-- 京东商城】uni-app之商品列表页面 (上)
JS handwritten sort
千亿元宇宙市场,Soul、映客的新动力
DCAT admin code generator application (re edit)
Lingo operators and built-in functions