SED command Related:Https://www.cnblogs.com/ggjucheng/archive/2013/01/13/2856901.htmlHttps://www.cnblogs.com/DragonFire/p/6600121.htmlHere we have to do the function is:Enter a directory "/data/data8"Transform it to "\/data\/data8" in the shell (this is to be used directly in the SED command behind the shell)Let's take
Tags: text file http file matching HTTPS shell command TPS NET ReadClick to view the original blog.sedis the abbreviation for Stream editor, which is a non-interactive stream editor for filtering or converting text.Not to be continued ...ProfileSed Options ... Script [Input File ...]DescribesedThe editor is called the Stream editor, which is the opposite of the normal interactive text editor. In an interactive text editor, such as VIM, you can use key
the contents of the mode space to the specified fileR/path/from/somefile: reads the text stream from the specified file into the matching pattern=: Prints line numbers for lines in pattern space;! : Reverse condition (for address range)S//: Replace, support using other separators, [email protected]@@,s###s/what to look for/replace with content/modifiers Modifier:P: Show the rows that were successfully replacedG: global substitution; By default, each line replaces only the first time: Back refer
1. To use the shell script in makefile, you need to add the "@" symbol, for example:@if [-D xxx]; Then \//-d to determine the existence, in the shell, with the [] number instead of parenthesesRM-RF xxx; \Fi@cp-FV xxx xxxx//-f Delete the existing target file without prompting the-v CP command will tell the user what is being doneExample: CP-FV temp TEMP2Display: ' Temp ', ' temp2 'Find all the KO files and copy@find sor_dir-name "*.ko"-exec sudo cp-vf
specified line, with the contents of StringI \string: Adds a new row before the specified line, with the contents of StringR file: Adds the contents of the specified file to the qualifying lineW File: Save the row in the range specified by the address as the specified files/pattern/string/modifier: Find and Replace, default replaces only the first string in each line that is matched to the patternModifier: G: Global substitution I: ignore character caseIn fact S///,s###,[email protected]@@ 都 th
contain a match. The output content only contains rows that do not contain the given word. For example, output all rows that do not contain the bar word:
$ grep -v bar /path/to/file
UNIX/Linux pipelines and grep commands
Grep is often used with pipelines. In this example, the name of the hard disk device is displayed:
# dmesg | egrep '(s|h)d[a-z]'
Display CPU model:
# cat /proc/cpuinfo | grep -i 'Model'
However, the preceding commands can also be use
ArticleDirectory
Linux Command Line cheat sheets
Solaris cheat sheets
Debian/Ubuntu cheat sheets
Package management cheat sheets
UNIX cheat sheets
Bash cheat sheets
Awk cheat sheets
Ed cheat sheets
Sed cheat sheets
Gdb debugger cheat sheets
The Linux/Unix System in
A Brief Study of some basic command line text editing programs that can save time and effort. Text editing is usually performed interactively in the text editor application. However, some tasks can be conveniently and quickly completed directly from the UNIX command line. In addition, you can use these single-command-l
Getting started with C Programming in Unix/Linux (39) shell Command System Management, getting started with shellDf command
This function is used to detect disk space usage and free space in a file system. It displays the usage of nodes and disk blocks in all file systems. The command format is as follows:Df [Option]
The Iconv command is a file-encoded reload tool that runs on the Linux/unix platform. When we look at the text file in the Linux/unix system shell, we often find that the file is garbled in Chinese, this is due to the encoding of the text file and the current operating system settings, which can be encoded by using the ICONV conversion, to solve the garbled probl
The Linux/Unix System in command line mode is always confusing to cainiao. We have published a set of Linux Command lines, but it does not seem perfect.Today, we are bringing you a list of command lines that collect Linux/Unix systems from various websites. The list is a col
Unix/Linux Command memorandum, unixlinux Memorandum
Arp: The ARP cache contains one or more tables used to store IP addresses and resolved MAC addresses.
// Extract all Bound0 ip and mac Information
Arp-n-I bond0 | awk '$5 = "bond0" {print $1, $3 }'
Sed: used to edit the text in a document or string through a series of commands
// Read a single row of data
Echoecho [OPTIONS] [string]-print STRING plus a line break-N Do not print end of line break-E After the string is escaped and printed-E does not escape string for direct printingFindFind [-h| l| P] [starting-point] [expression]The default starting-point is the current directory ".".-H/L/P:-H is not a trace symbolic link,-l is a trace symbolic link,-h is a symbol link only in command parametersExpression list: (Can be used in front of each expression!
Make is a very important compilation command, both in Linux and in the UNIX environment. Whether you are developing your own projects or installing applications, we often use make or makes install. With make tools, we can break down large-scale development projects into more manageable modules, and for an application that includes hundreds of source files, using the Make and makefile tools, you can easily a
The UNIX command set is a very distinctive set of commands. It is designed to be used to fully control UNIX machines. This section will discuss part of the UNIX command set. This section focuses on UNIX commands that are frequentl
Make is a very important compilation command in both Linux and UNIX environments. Make or make install is often used for project development and application software installation. With the make tool, we can break down large development projects into multiple modules that are easier to manage. For an application that includes hundreds of source files, by using make and makefile, You can streamline the comple
Unix| solution at present, Unix operating system in China's financial sector is widely used, UNIX with its powerful functions (time-sharing, multitasking, multi-user, network interconnection, graphics interface, etc.), much favored by financial enterprises. Agricultural Bank of China is currently applying the SCO UNIX
Label:command-line debugging tools in a UNIX environment: gdb If you need to use the GDB debugger, add the-G option to GCC. The following command section is a simplified version, such as using L instead of list and so on. 1. Basic Commands 1) Enter GDB #gdb test Test is the program to debug, generated by GCC test.c-g-o test. Enter the post prompt into (GDB). 2) View Source (GDB) L Source code will be a lin
UNIX® has its own dialect, and its command vocabulary is very large. But you don't need to master all the content at once. This article describes a number of command line combinations that promote your mastery of UNIX languages.
When you travel to a country that uses different languages, you may need to master some of
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.