Linux Shell Application Tips

-------------------------------------- Shell application Tips------------------------------------------A command completion: Tab completion shell command two: Clear or ctrl+l clean screen ctrl+u Erase all previous contents of the cursor history

Shell Common Command Collection

Grep-I ignores case-I skipping binary files-C Calculated Quantity-N Display Line number-R recursion-V does not match a keywordCommon combination CommandsGrep-iirn keyword * Search for files containing this keyword (n displays line numbers, I ignores

Linux mimics Shell operations

Linux file system is the hard disk space format into a number of node and block data blocks, the creation of general files, directory creation, will occupy a node, if the creation of a file, the specific data stored in a number of block data block,

Shell learning-Getting started with awk

I. AWK application ScenarioFormat data or extract records from a large text fileTwo. How to use Command line mode$awk [-F field-separator] ' commands ' input-file (s)Commands is the real awk command.The [-F domain delimiter] is optional, and if

Memo a few useful shell scripts

(1) under the shell, operate the Hadoop directory, batch name or delete, the final command sed the regular greedy replacement, look at the following script:Java code # traverse the file name under the Hadoop directory for line in ' Hadoop

The solution of the shell display-bash-4.1# under Linux

Very depressed, do not know what the reason, on the virtual machine to get that, the Centos6.5 seems to make a problem, the use of SSH remote landing on the CentOS, only show:bash-4.1#, very strange, whoami the root permissions displayed, PWD

Linux Learning Notes-11th lesson-shell Basics

1. Historical Order (History,↓, ↑,!) )The default value for history is 1000, which is specified in/etc/profilecommand history, which is used to query recent command histories;Use the arrow keys (↑) to query the previous command;Use the arrow keys (↓)

The Linux Shell "requires an integer expression here"

#! /bin/bashclearfunction verify{ If [$1-eq "Bob"] && [$2-eq "555"] then echo "verified" else echo "rejected" fi}verify Bob 555Run-time occurrence (integer expression required here) errorThe reason is a small error:"-eq" to compare

Variables and shell programming

Programming Ability:Script programmingProgramming languages: Machine language, assembly language, advanced languagesAdvanced Language:Static language: Compiled languageNo additional binaries are required, and a compiler is required to directly

memcached Start the shell script

#!/bin/sh## memcached:memcached Daemon## Chkconfig:-90 25# description:memcached Daemon## Source function library.. /etc/rc.d/init.d/functions. /etc/sysconfig/network#[${networking} = "No"] && exit 0#[-r/etc/sysconfig/dund] | | Exit 0#.

Shell Chapter (ii)

There are many shell types in Linux, common: Bourne shell (/user/bin/sh or/bin/sh),Bourne Again Shell (/user/bin/bash or/bin/bash),C Shell (/user/bin/csh or/BIN/CSH),TC Shell ((/user/bin/tcsh or/BIN/TCSH).The Bourne shell (i.e. sh) is the first

How to write shell scripts

Shell scripting is like a language, involving the environment, basic syntax, variable definitions, functions, parameters (System parameters), condition determination, execution Process control, and so on.This article describes the following aspects:

Shell reads user input

Use the read command when you need to get input from the scripting people during the execution(1) Basic readingThe read command accepts standard input or other file descriptor input. After reading the data into a standard variable.- p allows you to

A very simple shell backup script

The library to be backed up, passed in as an argument, delete the backup file from the previous 30 daysThe backup directory is created if it does not exist,/back/mysql/#!/bin/bashDatabase=$1Username= "Root"Passwd= "Redhat"Backupdir=

How the shell adds content after the specified file location

Recently encountered a problem in the work, want to add a flag bit after the specified location of a file, required to be implemented in the shell script.Problem Description:Want to add a flag after a string of sys_config.fex textFor example, there

awk basic usage of shell scripts

Script file:[Email protected]:/study/shell# cat awk_test.sh #!/bin/shawk_test_fun () {echo "\$0:" Echo $0echo "\$1:" Echo $1echo "\$2:" Echo $2echo "\$3:" Echo $3echo "Awk_test.txt content:" Cat Awk_test.txtecho "result of: ' akw-f\" \ "\

Some operations after the shell is set to none

Package com.yc.utils;Import java.sql.SQLException;public class Shellutil {    Private Boolean flag=false;    private int xx; The x-axis of the mouse position when you click the interface    private int yy; The y-axis of the mouse position when you

The shell sort of Java common sorting algorithm

In the process of learning the algorithm, we will inevitably touch many and sort-related algorithms. All in all, the basic sorting algorithm must be mastered for any programmer.Starting today, we're going to be explaining the basic sorting algorithm.

Run the system command and write the shell script that writes the output to the specified log file (2 ),

Run the system command and write the shell script that writes the output to the specified log file (2 ), The previous article was a simple script that can be executed and written into logs. However, if it is placed in the production environment, it

Shell scripts that execute system commands and write output to log files

Shell scripts that execute system commands and write output to log files This is probably the requirement. Run the usysfault command on the aix system to retrieve the fault light information. However, it seems that only the root user can execute

Total Pages: 541 1 .... 479 480 481 482 483 .... 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.