Learn awk, you must remember to practice, only in practice to find problems, the following on my experience in learning and practice, summed up the difference between rs,ors,fs,ofs and contact.
One, RS and ors
1,rs is the record delimiter , the default delimiter is \ n, specific usage look down
Copy Code code as follows:
[Root@krlcgcms01 mytest]# cat test1//test file
111 222
333 444
555 666
2,rs default delimiter \ n
Bulk Modify the delimiter of the file, you can use the FS and OFS commandsFs:field Separator, Field delimiterOfs:out of field Separator, output fields delimiterSuppose there is such a file file1.txt, which reads as follows:As you can see, the file1 delimiter is very long and consists of more than one space character, so we need to unify the delimiter first and enter the command:Awk-f "" ' {if ($1~/^16/) print $1,$2,$3,$4} ' file1.txt > File2.txtGenera
) flag.You can use this method to understand:Find the so-and-so flag, and make each and every content back into a rowExample1.txtA|b|cCode: awk ' begin{rs= ' | ';} {Print $} 'ABBORS: Can be regarded as the reverse process of RSExample1.txtABCThis can be understood as:Observe the newline symbol for each line, and replace the newline symbol with the symbol you want.awk ' begin{ors= '----'} {print $} ' 1.txtA----b----c----FS: Field delimiterThe FS default value is "(space)", such as "Hello Moto".Th
The RS, ORS, FS, OFS meanings behind awk in LinuxOne, RS and ORS where is the difference? We often say that awk is based on the row-and-column manipulation of text, but how do you define "lines"? This is the role of Rs.By default, the value of Rs is \ n. Below is an example to understand the Rs.echo ' 1a2a3a4a5 ' | awk ' {print '} ' 1a2a3a4a5echo ' 1a2a3a4a5 ' | awk ' begin{rs= ' a "}{print $12345"We can see that, after changing the value of RS, the r
" as a (newline) flag.You can use this method to understand:Find the so-and-so flag, and make each and every content back into a rowExample1.txtA|b|cCode: awk ' begin{rs= ' | ';} {Print $} 'ABBORS: Can be regarded as the reverse process of RSExample1.txtABCThis can be understood as:Observe the newline symbol for each line, and replace the newline symbol with the symbol you want.awk ' begin{ors= '----'} {print $} ' 1.txtA----b----c----FS: Field delimiterThe FS default value is "(space)", such as
Knowledge management is the knowledge, knowledge creation process and application of knowledge planning and management activities, the Organization to build a quantitative and qualitative knowledge base, so that information and knowledge in the organization through the acquisition, creation, sharing, integration, recording, access, update and other processes, and constantly feedback to the knowledge system, The formation of a never-ending accumulation of personal and organizational knowledge int
, wordy chat a few wordsProblem I and problem II can be solved in the background with Ob_clean () .The problem is solved at the foreground, but the data volume is not applicable, so use caution; you can let the background try Echo json_encode ($data, true); Echo Json_encode ($obj, Json_unescaped_unicode); or oneself to ~ The method is various, always has the suitable one;Summing up question two, is a problem with the JSON data is not rigorous, leading to the foreground parsing error.JSON data is
Label:Record the deepest fall in sturts2. PublicString Queryjoinaccount () {//the data used to store the pagingpagemap=NewHashmap(); //query the corresponding data according to the keywords and paging parameters. This method we wrote in the service in order to complete the cascading queryListCategoryservice.queryjoinaccount (Model.gettype (), page, rows); /*here to begin troubleshooting//list*/Pagemap.put ("Rows", categorylist);///stored as JSON format from the previous section of the JSON
We need to regard our desk as a workbench.
But in reality, we have done everything at our desk, many of which are not part of work (or cannot produce the best work efficiency before the desk ).
Below are some things I try to avoid at my desk:
Thinking: no one can make his brain think at the
Some people ask the front end/back end, front desk/rear desk to use what English?Look at the net friend gave the following answers:1. Client side, server side2. Front side, back side3. Front end, back end4. Foreground, background5. User Interface, Manage InterfaceMy understanding of these English:1. Client side the Chinese translation of the customer, the server side the Chinese translation as the service s
What is a small Q-desk? Looking at a friend computer on the small Q desk is curious, do not know what this is, its interface is very beautiful, it seems to have a desk flavor, which makes our mood very relaxed, then this small Q desk in the end is what?
Software small Housekeeper upgrade version is our "Small Q
settling down, the accumulation starts from here.The problem is simple, the site is displayed in front of the foreground and backstage management. Backstage Management front desk data display, picture display and so on, after comparison, will backstage and the foreground separates, did two projects, the question is the backstage upload picture file, how in the foreground project displays.Think of the use of ASP fileupload is can directly upload files
Some time ago, I moved to my residence, and I was missing a computer desk. Today I finally got my room ready. It's not easy.
I was dumpfounded when I opened the packaging: a pile of boards, large and small, and a pile of dingtalk.
Relatively strictly speaking, there are about ten boards, large and small, and about thirty dingtalk boards, large and small. Haha, it's enough for me!
As shown in the figure, let's take a look at their family. (I have in
Do you think it is necessary for Yii to put the verification and all the tags out of the background? I think that the complete front desk directly, but more simple, shorter time, the front and rear code separation cleaner
Do you think it is necessary for Yii to put the verification and all the tags out of the background? I think these complete front desk directly, but more simple, shorter time, front and re
Introduction to o365 manager plus Help Desk appointment
Although Office 365 allows you to work anywhere in the world, it provides very inadequate management capabilities. When an organization is distributed in multiple countries, it is difficult for an administrator to manage all users and mailboxes separately.
Several administrators in different regions can help you overcome the time zone issue, but it is easy to cause confusion when multiple people
Note: Ajax determines whether the async parameter is asynchronous or synchronous, false synchronous, true async;The asynchronous execution order is to perform the following actions before executing the success code;Synchronization is to execute the success code first, and then execute the subsequent code;Verify: Is the amount of data in sync too large to be stuck? For example, when searching large amounts of data from the background, does the page get stuck?1, ( asynchronous ) method invocation,
First, the foreground implementation by commodity classification display goodsSecond, click the foreground product picture or the name, display the product detailed informationThird, the front-page display to achieve paginationFour, the front desk user registration function is perfectFive, the front-desk user login PerfectVi. design of user's personal centerThis article is from the "Learn Without thinking"
Ecshop known as the largest open-source online shop system, the official introduction of it: "Ecshop online shop system is a set of free open-source web store software, no matter in stability, code optimization, operating efficiency, load capacity, security level, functional controllability and the authority of the rigor of similar products at home and abroad leading position.According to my understanding, as an online shop system, the security of the system should be placed in a very important
First, demand:In order to secure, the project in the foreground login password needs to be encrypted to the background, the background C # decryption login password.Second, the solutionUsing the asymmetric encryption algorithm RSA to achieve the purpose of the front desk landing page A load will send an AJAX request for the background generated public key, for the foreground encryption, the user click on the log on the encryption process and submit en
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.