Original article: Python scripts as a replacement for Bash utility scripts
From: http://www.oschina.net/translate/python-scripts-replacement-bash-utility-scripts
Translator: enixyu,Showme,Onion noodles
For Linux users, the reputation of command line
Sed (stream editor)
Function Description: Uses scripts to process text files.Syntax: sed [-hnV] [-e ] [-f ] [text file]Note: sed can process and edit text files according to script instructions.Parameters:-E or -- expression = processes input
Shell-7.shell Use of strings1. View the length of the string${#var} to calculate the length of the variable value:[Email protected] ~]# var= ' Yuanji '[Email protected] ~]# echo ${#var}62. Further discussion of single quotation marks, double
This article describes how to use Python scripts to implement some BashShell tutorials in Linux, including some simple input/output and email functions. For more information, see, command line reputation is quite high. Unlike other operating systems,
Article Title: SED single-line script Quick Reference (Unix stream editor ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems,
[] and test
Both are the same, and the test expr and [expr] have the same effect on the command line.The three basic functions of test are to judge a file, judge a string, and judge an integer. Supports the use of "and or not" to concatenate
Gedit factorial.sh myprog.cWhen you launch gedit with multiple files, it loads all the files into different buffers and displays each file in a tabbed window in the main editor window.The key to Shell scripting is to enter multiple commands and
Although GUI desktops, such as KDE and GNOME, can help users take advantage of Linux features without the functional knowledge of command-line interfaces, they often require more functionality and flexibility. Moreover, familiarity with these
1 about test testing, see the man documentationThe judgment of an expression(EXPRESSION) #EXPRESSION is True! EXPRESSION #EXPRESSION is FalseExpression1-a EXPRESSION2 #both is true,-o means orWhether the string is empty, equal-N string #the length
Although GUI desktops, such as KDE and GNOME, can help users take advantage of Linux features without the functional knowledge of command-line interfaces, they often require more functionality and flexibility. Moreover, familiarity with these
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.