Linux Shell script BASICS (6)

4) Functions If you write a bit more complexProgram, You will find that the sameCodeAnd you will also find it much easier if we use a function. A function looks like this: Functionname () { # Inside the body $1 is the first argument given to

Shell string processing

During shell programming, you often encounter the problem of getting the file name and file suffix. The general solution is as follows: 1 # Code 2 file = " thisfile.txt " 3 echo " filename :$ {file %. *} " 4 echo "

BASH Shell escape key garbled

From: http://share.blog.51cto.com/278008/583382   I wrote a very simple script to upload a file to a directory of HDFS in hadoop. When you enter the file name or directory name, an error occurs sometimes and you need to delete the incorrect

Installation Steps of peanut shell for Linux

I would like to remind you that this client sends a UDP heartbeat packet to the server through port 6060. The package information is as follows: 17:19:35. 734433 IP 192.168.1.7.32773> 61.152.96.119.6060: UDP, length 2017:19:35. 784568 IP 61.152.96.

64. Shell Command, MV, RM, mkdir

1. mv 1) mV-move (rename) files MV [Option] source dest MV [Option]... source... directory Rename source to DEST, or move source (s) to directory. 2) Options ①-F, do not prompt before Overwriting ②-I, prompt before Overwrite ③-N, -- no-

49. Linux shell commands, host, NSlookup, and dig

1. Host 1) DNS lookup Utility Host option {name} [server] Use/etc/resolv. confMedium serverAs the source of the DNS server 2) Option -A: lists detailed host name settings for this host. 3) Example Host www.google.com 2. NSLookup-

40. Common Linux Shell functions: mkdir, rmdir, and mount

1,Mkdir -M, -- mode = mode set file mode (as in chmod), not a = rwx-umask -P, -- parents no error if existing, make parent directories as needed Mkdir-P dir1/dir2 // IfDir1Does not exist, also createDir1 Mkdir-M 755/usr/dir3 // and setMode 2,

Exec in Shell

EXEC command in Shell 1.-exec parameter in find In the current directory (including subdirectories), find all TXT files and find the rows containing the string "bin" Find./-name "*. txt"-exec grep "bin "{}\; Delete all TXT files in the

TP-LINK wireless router + peanut shell + Serv-U Configure ftp server

I,InstallServ-U II,ConfigurationServ-U 1.OpenServ-U Administrator. 2.CreateFTPDomain SelectServ-UServer»Local Server»Domain, right-click Create a new domain. DomainIPAddress: LocalIPAddress (192.168.1.x), Domain Name:Ftp.domain.com, Port

An alternative to shell commands such as dir in Windows

Windows cmd command line shell is often used in work, but the commands in it are too unaccustomed, such as using dir for column directories, etc, I prefer more Linux commands. If you also hate windows cmd command names, you can install coreutils

Nine shell solutions to practical Linux O & M Problems

Source: Old Boy's Linux blog Author: Old Boy The problem is: 4) known: the content of/etc/hosts is 192.168.1.11 oldboy11.etiantian.org 192.168.1.21 oldboy21.etiantian.org 192.168.1.31 oldboy31.etiantian.org #192.168.1.111

Bash command on MAC (1) Introduction to Bourne-again shell

The terminal on Mac uses the Bourne-again shell command, bash for short. Bash is a project developed and promoted by GNU.Extended Bourne shell Bourne shellIs the original shell used by UNIX, authorSteven Bourne Bash is the internal shell of many

Linux Shell decompression command

. TarUnpack: Tar xvf filename.tarPackage: Tar CVF filename.tar dirname(Note: tar is packed, not compressed !)---------------. GZDecompress 1: gunzip filename.gzDecompress 2: gzip-D filename.gzCompression: gzip filename .Tar.gz and. tgzDecompress:

65. Shell, input/output redirection

1. Redirect related file descriptors 1) file descriptor ①0 standard input,/dev/stdin->/proc/self/FD/0 ②1 standard output,/dev/stdout->/proc/self/FD/1 ③2 standard error output,/dev/stderr->/proc/self/FD/2 2) redirection ①> Is 1> ② ③>

How to change the logon Shell

1. I want to know which shells have been installed on my machine? You can view the following two methods: First: [Rocrocket @ wupengchong ~] $ CHSH-l /Bin/sh /Bin/bash /Sbin/nologin /Bin/zsh Second: [Rocrocket @ wupengchong ~] $ CAT/etc/shells /Bin/

Shell File Reading

1 -- shell Method for reading files # Use the READ command to read a row of data while read mylinedoecho "line:" $ mylinedone # Use the READ command to read a row of Data cat datafile.txt | while read mylinedo echo "line:" $ mylinedone # Read

Powershell _ basic course _ 2_powershell and CMD and Unix/Linux Shell

Part 1ArticleI said that in order to change users' criticism on their console interface, Windows Vista started and planned to change this situation. The appearance of powershell. 1. compatible with shell commands To be compatible with

Zenity: Add shell to graphical interface

Sometimes you can write your own gadgets and prefer non-graphic interfaces. However, some applications still bring up a reminder to let you know. Zenity is a very handsome thing. For its usage, refer to its -- help. I will not repeat it here. Here

Special symbols commonly used in Shell

Common special symbols in shell are listed as follows:#;.,/\ 'String' |! $ {}$? $ * "String "***? : ^ $ # $ @ 'COMMAND '{} [] [[] () | & {XX, YY, ZZ ,...}~ ~ + ~ -& \ +-% =! = Output/input redirection>>>&> 2 &> 2 <>>&> & 2 # Comments)This is

ADB shell command

Generally, the ADB shell command is used during development. In my personal development, apart from some ADB commands, in fact, the basic commands of Linux are also very important, especially during terminal debugging. The development environment is

Total Pages: 541 1 .... 234 235 236 237 238 .... 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.