Basename is the name left after the directory is removed.Example: shell> temp =/home/temp/1. TestShell> base = 'basename $ temp '(reverse quotation marks)Shell> echo $ BaseResult: 1. TestDirname is the DirectoryExample: shell> temp =/home/temp/1.
Example about Linux Shell #! /Bin/bash echo "Hello world! " echo" Hello $ LOGNAME, it's nice talking to you " echo" U present working on a machine is 'uname-N' " echo" U Present working directory is $ (PWD) " echo" Bye for now $ LOGNAME. the time
When executing a shell script (calling JavaProgramWhen you modify an Excel file), you can obtain the desired result by Sh.
However, after the crontab is scheduled to run, no new Excel file is obtained, and no log error is reported.
After checking
Introduction to kernel, shell, and bash
First, let's talk about what is kernel:The kernel is the core of Linux. All user operations are completed by the kernel, but the user does not directly perform all operations on the kernel. Why? Because there
This article summarizes some of my frequently used shell commands or some short commands.
1. view the compile time of a tool;
ll $(which appname)
2. Common for Loops
for i in 1 2 3 4 5; do echo "$i"; done;
for((i=140;i
3. Commonly Used File
Term: freexploit
Author: allyesno
Date: 2005-06-21
Codz:
@ Echo off: Ncfoever 1.0 bulid by allyesno: Can be used to capture TCP port data packetsCLS:/* Parameter judgment and usage instructions */Set COUNT = 1If/I "% 1" = "-Look" Goto
Today, I wrote a shell script to count the number of lines of source code in a directory, as follows :#! /Bin/bash
Find.-Name *. Java> srcfilespathname
Count = $ (WC-l srcfilespathname) # record the number of source files
Echo "number of source
CCID Continuing Education Students compile Unix shell program Examination1. What are the advantages of using functions in shell scripts? Which of the following is not correct. BA. They are faster than separate commands.B. They can execute recursive
1. Using securitycrt in the options-> session Options dialog box, there are many options for emulation under terminal. the Linux server has different terminal simulation packages called the terminfo database, each type corresponds to a terminfo File
1. count the number of occurrences
: % S/178 // ng
Text Test
711[10.235.170.22:8123] 0 10.232.20.178 1648042 1648042 0 2013-07-29 20:01:35711[10.235.170.22:8123] 11 10.232.20.178 6445135
/*************************************** ******************************* Author: Samson* Date: 08/17/2012* Test Platform:* GNU Linux version 2.6.29.4* GNU bash, version 4.0.16 (1)-release (i386-redhat-linux-gnu)
**************************************
Shell script compiling basics in Linux, although there are a variety of graphical interface tools, token is still a very flexible tool. Shell is not only a collection of commands, but also a very good programming language. You can use shell to
Anyone who knows makefile knows that makefile can call shell scripts. But in actual use, it is not that simple, and some ambiguity may make you crazy. If you don't believe it, let's take a look at several examples. Imagine what these examples will
In Shell, only one process can be implemented at a time:
1. lockf command
2. Simple implementation:
I = 'ps-Ef | grep [N] ew_mvbackup | WC-l' if [$ I-GT 1];ThenEcho "wait for the other mvbackup finish! "Exit-1Else
# Do something here
3.
HP integrity ServerOn EFICommands supported by the Shell InterfaceWhen npartition is active but the operating system has not been bootedCan be accessed from the npartition ConsoleEFI shell.You can use the following command categories:• "Pilot
1. Write a script to calculate the factorial of 10 in a loop.
#! /Bin/sh factorial = 1 for a in 'seq 1 10' DO factorial = 'expr $ factorial/* $ a' done echo "10! = $ Factorial "
2. Write a script. After the script is executed, print a
1. Install SSH. skip this step and click Next.
2. Click SSH Secure Shell client and click quick connect above,
HOST: the IP address of the connected Linux instance (Log On As root in Linux, and view the IP address in ifconfig as shown in Figure
Shell is a program that interfaces between users and Linux systems. It allows users to input the commands to be executed to the operating system. Many powerful functions can be implemented through shell.
1. Redirection
File descriptor: 0 indicates
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.