idonethis

Learn about idonethis, we have the largest and most updated idonethis information on alibabacloud.com

Shell grooming (27) = = = Uppercase and lowercase letters replace modified file names

= ' echo $a | cut-c1-$b '# Touch Dingxue$c#doneA= ' ls ding/|xargs-n1 'echo {A.. Z} |xargs-n1>fileD= ' Cat file | Wc-l 'echo "$a" |while read lineDoe=$ ((random% $d + 1))W= ' echo $line |awk-f ' [0-9] ' {print '} 'B= ' echo $line | Cut-c 1 'f= ' Cat file | Sed-n ' $e ' P 'G= ' echo $w |sed ' s/' $b '/' $f '/' #sed, awk reference variable all add single quotes#echo $g Specific circumstancesH= ' echo $line | Awk-f ' [A-z] ' {print $8} 'I= ' echo $h |tr ' $h ' A-Z ' # here too, be sure to pay atten

Day02 Script Exercises

/$filename $backdirElseecho "$filename has been backed up" >/dev/nullFiFiDone9, pc_noline.shIP address of the online host in the output 192.168.1.0/24 network segmentCount the number of non-online hosts,and save the IP address and the time that is not in the line host to the/tmp/ip.txt file.#!/bin/baship=192.168.1.J=0For i in ' seq 10 12 'DoPing-c 3 $ip $i >/dev/nullIf [$?-eq 0];thenEcho Online hosts are: $ip $iElseLet J + +echo $ip $i >>/tmp/ip.txtDate >>/tmp/ip.txtFiDoneEcho does not have a li

Linux Basic Knowledge VI

. Display the user name of the user who is located in the/etc/passwd file in the first even row;Sed-n ' n;p '/etc/passwd | Cut-d:-f113. Create 10 user user10-user19, password and user name;#!/bin/bashfor i in ' seq ';d ouseradd user$iecho "User$i" | passwd--stdin User$i;done14, create 10 empty files file10-file19 in/tmp/;#!/bin/bashfor i in ' seq ';d o touch/tmp/file$idone15. Change the file10 and the genus to user10, and so on.#!/bin/bashfor in ' seq ';d ochown user$i:user$i/tmp/file$

Shellwhile Loop, c-for Loop, until loop, case branch structure, flow control statement

function, set return value of functionShift (position move function)Used to migrate location variables, pass $1-$N values to the left, and delete variables with no valueExample 1:$ $Ten shiftShift ShiftExample 2: Example 3:#!/bin/bashi=0Echo $#while [$#-GT 0]echo $ doShifti= ' expr $i + $ 'echo $#shift echo $ $ doneShiftEcho $iEcho $#Echo $ $Cases:#!/bin/bashFor ((i=1;iDoIf [$i-eq 9]#break#continue#exit 2FiEcho $iDoneThis article is from the "Wsyht

Linux common face question 2

program, to obtain some of the data he wants to know, this is called SQL injection. SQL injection is accessed from the normal WWW port, and the surface seems to be no different from the general Web page access, if the administrator does not view the log habits, may be invaded for a long time will not be detected.Filtration and Prevention:Database Web Port Injection This, you can consider using NGINX_WAF to do filtering and preventionScript1. Use shell programming to determine if a file is a cha

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.