Printf and shell touch

Source: Internet
Author: User
Tags print format

Formatting: printf'print format' actual content
What are the characters represented by the value 45?
Printf'/x45/N' Note:/xnn is a two-digit number, which can be converted into characters.

Introduction to SED and awk tools:
You can analyze the standard input data and output it to the standard output after processing. It supports replacement, deletion, addition, and selection of specific rows.
Sed is often used for processing the entire row, while awk tends to process the number "field" in one row, because awk is suitable for processing small data.
Sed [-nefr] [action]
Awk 'condition type 1 {Action 1} Condition Type 2 {Action 2} ...... 'filename

Test can test whether a file exists and is of great use in shell programming.
[Samson @ yygy] $ test-e mutex. c
[Samson @ yygy] $ test-e mutex. C & Echo "yes" | echo "no"
Yes

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.