Shell Scripting Interaction: Automatically entering passwords

Usually in the console input commands such as: sudo, SSH, ftp or modify the admin permissions of the file will require input password, but in the She ll script to run the process of how to automatically enter the password. Below is a summary of

Use expect here Document in shell

When you use a shell to write a program, you sometimes have to confront the problem of interaction--unfortunately, the shell can't automatically complete the interaction. If the interactive content is many, it is convenient to apply expect script

A small calculator compiled with a Linux shell __linux

#!/bin/sh Echo-n "Welcome to I programming World" Echo-n "This program is a calculator" Operator= "+-x/exit" echo "Please input two digits:" Read Number1 number2 Select I in $operator Todo Case $i in +) result=$ (($number 1+ $number 2))

"Linux" shell Linux/unix under the shell shortcut operation large set __linux

Sometimes we need to repeat the previous commands in Bash. You can certainly use the UP ARROW keys to view the commands you've run before, but this article describes some of the better ways, such as!!,!a,!number,!-number,!$,ctrl+r shortcuts. This

Shell Script Logical Backup Database

[Zxw@host1 ~]$ nl shscp/dump_backup_my.sh1 #!/bin/bash2 #dump MySQL data once per day, the reserve last 7 days data.3 #zhao Xiaowei4 #2014.08.275 Path=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:~/bin6 Export PATH7 dir=

(shell) Rman backup script

1. Fully prepared (including control documents) [Oracle@centos6 scripts]$ cat rman_backup.sh source/home/oracle/.bash_profile Rman target/log=/home/oracle /backup/backupall_rman.log 2. Support for full-library and incremental backups

Linux GB2312 turn UTF-8 shell script __linux

Reprint please indicate source http://blog.csdn.net/imred/article/details/40951125 Under Linux to see some txt files often appear some garbled problem, so I wrote a shell script to GB2312 code into UTF-8 code #!/bin/bash #格式:./gb2312_2_utf8.sh

Shell programming implements kill thread __ programming

[Root@centos65 liumengyang]# cat test.sh #!/bin/sh #if The process Exists,kill it pid=$ (Ps-ef|grep java| awk ' {print $} ') pidname=$ (ps-ef|grep java|grep-v ' grep ' |awk ' {print} ') #judge If the process is Running.if Not,restart. If

Shell input and output redirection __linux under Linux

on the shell: 0 indicates standard input, input data from the terminal, generally refers to the keyboard 1 indicates the standard output, the data displays to the terminal, generally refers to the screen 2 indicates standard error output, Error

Shell Sort Command-sort

The sort command sorts multiple rows of data in a behavior unit.For example, there is a text file Test_sort, which has five elements, using the sort command, the five elements can be sorted in dictionary order from small to large.If the sort command

Use of join in Shell programming _ programming

http://www.51testing.com/?uid-45739-action-viewspace-itemid-185211 JoinSimilar to the Join method in db, there is also a left join right join INNER JOIN, etc.Specifies the way the join is specified by the parameter-A.-A1 represents a row that

How to implement automatic Telnet with shell script

Turn from: http://blog.csdn.net/edei2004/article/details/3694021 Many people think that telnet, like passwd and Su, cannot be turned on by pipes and inputs to make it work automatically, but Telnet actually supports input steering. Although,

Shell reads multiple files at the same time

Read two files at the same time, and merge their peers into one line to write to a merged file Shell script: #!/bin/bash #set -x CD ' dirname ' $ '/. / inas_script_root= ' pwd ' function Make_if_no_existis_dir () {local dir=$1 if [!-e ' $

The use of regular expressions in the Shell __ regular expressions

Here are two ways to use the shell's regular expressions. use method One: #赋值给变量var read var #定义regex正则表达式 regex= "[0-9]" if [$var =~ $regex]];then #match #do Something fi For example, to match the input, the requirement must be a number

Linux Shell Script Learning notes collation __linux

Specify the script interpreter #!/bin/bash Note: 1, the declaration can only be placed in the first line of the script, indicating that the script uses the Bash interpreter to interpret execution, otherwise it will be interpreted as Comment 2,

HBase shell command

HBase contains a shell that can communicate with HBase. HBase uses the Hadoop file system to store data. All these tasks occur in HDFs. Here are some of the Common HBase shell commands. Data Manipulation language Command

HBase Summary (13) HBase Shell common Commands and examples

Let's take a look at some of the basic operations commands of the HBase shell, and I've listed several common hbase shell commands, as follows: Name Command-expression Create a table Create ' table name ', ' column

Description: Shell explanation command, calling program

First, Introduction 1. Cal Calendar LS Viewing files and directories WHOAMI Viewing Current user information Users or who or W view the current online user Logout Sign Out Shutdown or Powoff shut down the system Init 6 or Reroot reboot system passwd

Hadoop Learning Notes (15)---the use of Hbase shell commands

1. Start HBase, go to the Bin folder under the HBase folder, and then execute the command: HBase Shell [Root@hadoop0 bin]# hbase shell hbase shell; Enter ' help ' for list of supported commands. Type "exit" to leave the HBase Shell Version 0.98.12.1

HBASE Common shell commands, additions and deletions to search

First give the data of this operation Create ' student ', ' info ', ' address ' put ' student ', ' 1 ', ' info:age ', ' Put ' student ', ' 1 ', ' info:name ', ' Wang ' put ' student ', ' 1 ', ' info:class ', ' 1 ' put ' student ', ' 1 ', '

Total Pages: 541 1 .... 396 397 398 399 400 .... 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.