Shell Basics (iv) Uniq and TeeUniq is used to repeat the row, the most common option is only one, that is,-C count counts the number of repeated rows, and writes the number of repetitions in front.Note: Use the premise that you need to sort the files first, otherwise it won't work.#vim aming.txt "Write"111222111333#uniq aming.txt "Separate use of uniq, do not remove duplicate lines that are not together."111222111333#sort aming.txt |uniq "After using sort, use Uniq"111222333#sort Aming.txt |uniq
-I ignores caseBut then there will be no output generated, because when the two files are the same as the default behavior, if you want to see the prompt say the same thing:-S option reports the same two filesUse -B to ignore spacesCompare two files differently and produce patchesIn addition to files, thediff command can compare two directoriesVimdiffThere is only one row in a file, the color is relativeTwo files exist, but contain differences in the behavior of one color, causing the difference
In Linux, the system that improves performance calls sendfile. Splice and tee may be familiar with Linux kernel version 2.4: a static Web Page Server named khttpd is embedded in the kernel of version 2.4. At that time, it may be because of the efficiency factor that she was added. As to why the latest version 2.6 kernel removed this server, I think it may be because the Linux kernel "only provides a mechanism, and does not provide a policy ", of cours
1. under the root directory/core: This directory file is only used to build tee core/lib: This directory file is used to build tee core and trusted applications/ta: This directory file is only used to build trusted applications/MK: Build the system's compiled file (Makefile)/tmp-stuff: Temporarily stored and will be deleted before final compilation is complete/scripts: Help scripts for multiple tasks/out: I
removes the wtmp row, you can understand the number of rows to be calculated.
Bidirectional redirection: Tee
[Root @ Linux ~] # Tee [-A] FileParameters:-A: add data to the file in the append mode!Example:[Root @ Linux ~] # Last | tee last. List | cut-d ""-F1# This example allows us to save the last output to the last. list file;[Root @ Linux ~] # Ls-L/home |
To think of something simple, we know that > will transfer the data stream to a file or device, so we cannot continue to use this stream unless we go to read the file or device. What should I do if I want to save a piece of information in the process of processing this data stream? With tee We can look at this in a simple way:Tee will distribute the data stream to the file and screen at the same time, and the output to the screen is actually stdout, a
; Data_bck.sqlDelete all previous incremental logs and generate new logs after fully backing up all databases:MYSQLDUMP-H192.168.4.20-UUSERNAME-PUSERPSWD--single-transaction--flush-logs--master-data=2--all-databases-- Delete-master-logs>data_bck.sqlIncremental backups:Perform a full backup first, and then perform the update log:MYSQLADMIN-H192.168.4.20-UUSERNAME-PUSERPSWD Flush-logs
Third: Directly copy the Data directory.Stop the MySQL service or lock the database table, copy the data director
Learning Vim Command: ": w!sudo Tee%"The original Original url:http://www.haw-haw.org/node/1501 from CommandlinefuThe original text explains this order in this way:Save the file you are editing in Vim without the necessary permissions.(Save a file edited in Vimwithout the needed permissions)Below we analyze how this command is done to save the file without the necessary permissions: w!sudo Tee%Man, Vim will
Usage of tee: tee [Option]... [file]... copy the standard input to each specified file and display it to the standard output grep-r-I-E "sss | aaa ". /| grep-v. /doc/| tee-a log.txt grep-E is matched by regular expression www.2cto.com grep-r is a recursive directory grep-v is excluded from some subdirectories. The tee-
used to repeat the line, the most common option is only one-C: Statistics duplicate rows, and write the number of lines in front */[[email protected] ~]# VIM test.c//use VIM to open a file, write several numbers 111222333222444333~[[email protected] ~]# uniq test.c//Direct with UNiq command, found that the file did not change 111222333222444333[[email protected] ~]# sort test.c |uniq//First sort, then in Uniq, so use Uniq if you have to sort the files and then repeat111222333444[[email protecte
Function Description: Reads the standard input data and outputs its contents to a file.Syntax: Tee [-ai][--help][--version][file ...]Note: The tee instruction reads data from a standard input device and outputs its contents to a standard output device while saving it as a file.Parameters-A or--append attaches to the back of the existing file rather than overwriting it.The interrupt signal is ignored by the-
and shell of the 9th user in the/etc/passwd file.Display to the screen and save it to the/tmp/users file;[Email protected] ~]# tail-9/etc/passwd | head-1 | Cut-d:-f1,7|tee/tmp/usersRpcuser:/sbin/nologin Tee content is displayed on the screen and saved to the specified directory7. Display all files starting with PA in/etc directory, and count the number of them; [Email protected] ~]# ls-d/etc/pa* | Wc-l48,
About the Tee command is the delivery of standard input information to a file.Use the Linux Help documentation as follows:Tee: Read from standard input and write to standard output and filesCommand form: Tee [options] FileOptions:-A--appendAppend to end of file, do not overwrite file-I.--ignore-interruptsIgnore interruptsAn example to output the row redirection of a root-containing item in the current direc
#去重复, one more feature than sortUniq 2.txt adjacent two digits to repeat#显示重复的次数Uniq-c 2.txt#与sort一起用Sort 2.txt | Uniq-c#写入并显示出来echo "111111" | Tee 1.txtExercises:1. Uniq is used to repeat, what command do we need to use before we can repeat the process?Sort2. Uniq which option can show the number of repetitions?-C3. What is the role of the tree command?Directs the correct output information to a file and displays it on the current screenSummarize:Mai
/passwd file into uppercase characters after output; [email protected] tmp]# Head-n 6/etc/passwd | Tr ' A-Z ' A-Z ' root:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/ nologinadm:x:3:4:adm:/var/adm:/sbin/nologinlp:x:4:7:lp:/var/spool/lpd:/sbin/nologinsync:x:5:0:sync:/sbin:/bin/ SYNCTee command: Overwrites the results of the previous command to a file in a pipeline[email protected] tmp]# Cat A.txt | Tee B.txt
descriptionFor statisticalCommand syntaxWC [parametric]Parameters-L: Count rows-M: Statistics of characters-W: Number of statistical wordsCase[Email protected]/]# cat/etc/passwd |wc-l-m-w19 29 883[Email protected]/]# cat/etc/passwd |WC19 29 883[Email protected]/]#PS: In fact, there is no need to add parametersUNIP Command Command descriptionUsed to delete duplicate rowsCommand syntaxXxxxx|unipParameters-C statistics Number of rows to repeatCase[Email protected] ~]# Uniq testb.txt111222111333[Em
This morning, I spent half a day and several hours in the afternoon. I finally got it done and decided to solve the pressing problem for everyone. If you have a better solution, please let me know. :)
1. Select to delete previous versions.Delete the WINNT \ system32 \ tee * 70 File2. Enable Delphi7CompileDelphi 2005: tee7d9. BPGDelphi 7: tee7d7. BPG
3. Install the DCl package
4. reinstall fastreportInstall fastreportModify the frxreg. inc file accordi
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.