Linux shell Command Cat

Cat: View the contents of a file, connect a file, create one or more files, and redirect output to a terminal or file usage: cat [options] [file]1. $ Cat Hello.txtdisplaying content in a hello.txt text file2. $ cat-n File-N option to display the

shell--Input/Output redirection

Transfer from http://www.cnblogs.com/chengmo/archive/2010/10/20/1855805.htmlBefore we get to the redirect, let's take a look at the Linux file descriptor.Linux File Descriptor : Can be understood as a Linux trace open file, and the allocation of a

70 Classic Shell Script interview questions

1) How do I pass parameters to a script?./script argumentExample : Show file name script./show.sh File1.txtcat Show.sh#!/bin/bashcat $2) How do I use parameters in a script?First parameter: $ $, second argument: $ AExample: The script will copy the

The difference between $ (()) in the shell and $ () and ${}

$ () and ' (anti-quote)In the bash shell, $ () and "(anti-quote) are used for command substitution.The so-called command substitution is similar to the variable substitution we learned in the fifth chapter, which is used to reorganize the command

Linux Modify shell command prompt and color

Linux Modify shell command prompt and color1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:[Root@~/wade/

[Shell] Bash variables: Configuration file and login information for environment variables

-----------------------------------------------------------------------------------------Only the environment variables are placed in the configuration file to automatically take effect each time the power-on. SOURCE command: Let the configuration

Shell Small Script

Use the awk command to combine two lines of the same name in the following two files.A file:Han Hailin 21 years oldHailin Korea 23 years oldHan Linhai 22 years oldLin Hai Han 24 years oldB File:Han Linhai MaleHailin Han NanHan Hailin MaleLinhai Han

[Chapter II] Shell variables

One, variable Variables are the use of a simpler string instead of some special-meaning settings and data. Taking path, this path replaces the absolute path of all common commands, and with the variable path, we no longer need to enter the

The method of variable passing between awk and Shell

The method of variable passing between awk and Shell awk is a good thing to do with Linux, and it's very handy to work with some text files. under Linux, it's often the case that you deal with the shell , so the variables between awk and The shell

Linux Shell Learning

Shell Features--Linux has a variety of shell can be used, the default for Bash,bash has the following key features.1. Command Memory AbilityPress the up and down keys on the command line to find a pre/Post input command, which is recorded in ~/.bash_

Meaning of variables $$, $ A, etc. in shell scripts

The execution name of this program$n the nth parameter value of this program, n=1..9$* all parameters of this program, this option can have more than 9 parameters.$# the number of parameters for this program$$ the PID of this program (the current

Shell Scripts-Conditional statements, case statements, function functions

Modify the previous Code1. Determine if it is hello, and if so, show "Hello, how is it?" ;2. If no parameters are added, the user is prompted to use the parameter release method;3. If the added parameter is not hello, the user is reminded that only

"Linux uses" shell command line common shortcut keys

Move:Ctrl + A: Moves to the beginning of the currently edited command,Ctrl + B: Moves to the end of the currently edited command line,Ctrl + F or->: move by word aligns (toward the end of the command line, forward)Ctrl + B or Alt + F: Move right by

Linux-bash shell function; built-in command type

Command editing ability (history):One of the great features of Bash is that "he can remember the commands he used!" "This is a really great feature!" Because I just press "up and down" in the command column to find the front/rear input command! In

Linux Shell Scripting Raiders Review

1. After opening the terminal prompt, $ represents a normal user, #表示管理员用户root, root is the most privileged user in the Linux system.2. A shell script is usually a text file with a #! start, where #! precedes the interpreter path. Example:

Shell Script Example Collection (exercise summary)

Practice One: Write a script1The value of the set variable file is/etc/passwd2. Turn to/etc/Say hello to each user in passwd and say what the ID is like: (Hint: line= ' Wc-l/etc/passwd | Cut-d" "-F1 ') Hello,root,your UID is 0. 3. Statistics a how

awk usage in the shell

Brief introductionAwk is a powerful text analysis tool, with the search for grep and the editing of SED, which is especially powerful when it comes to analyzing data and generating reports. To put it simply, awk reads the file line-by-row, using

Linux Shell Programming (3): arrays

Http://snailwarrior.blog.51cto.com/680306/154704BASH only supports one-dimensional arrays, but there is no limit to the number of parameters.declares an array:declare-a Array(In fact, you don't have to declare it, you assign it directly to the

Mikrotik RouterOS Script-peanut shell dynamic Domain name analysis

1, SETP1Turn on the NTP protocol and modify the time zone:/system NTP Client set Enabled=yes server-dns-names=1.centos.pool.ntp.org/system clock set time-zone-name=asia/ ShanghaiDetects if the route communicates with the dynamic Domain name

"Dynamic Domain name resolution tool" tunnel, domestic version of Ngrok, peanut shell can sleep

In the author's series of development tutorials, there is a relatively basic and important section: Development debugging. In the article I recommend two dynamic domain name resolution tools to deploy the local development environment as a server,

Total Pages: 541 1 .... 192 193 194 195 196 .... 541 Go to: GO

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.