In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the use of linux's mapfile command to read rows from standard input and assign values to the array. I hope you will learn a lot after reading this article. Let's discuss it together.
The mapfile command is used to read lines from standard input or file descriptors and assign values to an array
Syntax format: mapfile [parameters]
Common parameters:
Reference example
First create a file alpha.log for the example, one lowercase letter per line, with a total of 26 lines:
[root@linuxcool ~] # echo {a.. z} | tr "\ n" > alpha.log [root@linuxcool ~] # cat alpha.logabcdefghijklmnopqrstuvwxyz
Read the alpha.log file and store each line in the array myarr (if not specified, in the default MAPFILE array):
[root@linuxcool ~] # mapfile myarr
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
@ echo offset / a _ Debug=0::==:: Get Administrator Rightsset _
© 2024 shulou.com SLNews company. All rights reserved.