Always use VMware 6.0 45731 and run Debian 3.1r5 testing.
We are still busy with our homework. Just yesterday, I wanted to install ATI graphics card driver for the virtual machine, and then upgraded GCC from 4.1.1 to 4.1.2 by the way, then the share folder function of the virtual machine fails. reinstall vmware-tools and an error is reported.
"Your kernel is based on GCC 4.1.2, while your GCC is GCC 4.1.3 (I don't know why), and ask if you want to recompile it ",
I re-compiled it and reported th
ShellIFSreadLine. sh
processLine(){line="$@"echo $line} FILE="" if [ "$1" == "" ]; then FILE="/dev/stdin"else FILE="$1" if [ ! -f $FILE ]; then echo "$FILE : does not exists" exit 1 elif [ ! -r $FILE ]; then echo "$FILE : can not read" exit 2 fifi BAKIFS=$IFSIPS=$(echo -en "nb")exec 3
Use IFS for file analysis, or separate specific file characters
#shell environment $IFS useage# S : Internal Field Separat
): " fileflagif[ "$fileflag" != "Y" ][ "$fileflag" != "Y" ];thenecho "pleaseuploaduserpublic keyfile (e.g.xumin.pub) tohomedirectory.\n " exit2fiecho "startchanging.......\n" #检查公钥文件是否已经上传filepath =~/$username .pubif [-f $filepath ];thenecho "$filepath file exists!" elseecho "$filepath file does not exist or you have entered the wrong path" exit3firm -rf/home/$username/.ssh/authorized_keys# Rename the public key to the corresponding place mv~/$username. pub/home/$username/. ssh/authorized_key
one of the most probable causes of the script file in the error is DOS lattice, which is the line end of each line is identified by \ r \ n, and its ASCII code is 0x0d, 0x0A.There are many ways to see if the file is in DOS or UNIX format, or in MAC format.Enter for example the following in terminal:VI filenameand then use the command: Set FF?Can see the word dos or UNIX. Assuming it is a DOS format, you can use set Ff=mac to force it to MAC format, and then save the disk to exit. Run it again an
SH, telnet, network copy file, putty, connect to windows Remote Desktop terminal, remote control linux desktop-Linux Enterprise Application-Linux server application information, the following is the details. I, the simplest command line to connect to the linux Server (in fc6, the ssh service is started by default)
# Ssh 192.168.0.1
To log on to ssh as a user,
# Ssh user@192.168.0.1
Ii. graphic interface copying files over the network (strong in Gnom
First, when sh: grub is displayed, type the following code:Ls will display the current hard disk partition, as my result is(Hd0) (hd0, 1) (hd0, 5) (hd0, 6)
(Hd0, 1) is a C drive. I installed ubuntu on a D Drive, that is (hd0, 5). In fact, as long as you know which partitions are there, you can try them one by one, the following code is used:
Set root = (hd0, 5) enterLoopback loop0/ubuntu/disks/root. disk enterSet root = (loop0) enterLinux/boot/vml
Springboot project, packaged directly into jarsWith Tomcat, you can run directly from Java commands without web App service.For Maven, for example, configure the packaged output type in Pom.xml:Configuration build: Once packaged as a jar, it can be started or stopped directly through batch processing.Window-batStart@echo off: WMIC process where "commandline like '%%-jar reportcheck%% '" Call terminateSet path=C:\Program files\java\jre1.8.0_91\binReportcheck-0.0
symbol is%. The
Korn Shell is a superset of the Bourne Shell (superset), developed by David Korn at/T. It adds some features that are more advanced than the C shell. Features of the Korn shell include editable history, aliases, functions, regular expression universal characters (regular expression wildcard), built-in arithmetic, job control, co-processing (coprocessing), and a special debugging function. The Bourne shell is almost completely up-compatible with the Korn shell (upward com
VPS Scheduled BACKUP DATABASE command, save the following code as BACKSQL.SH, and then set the scheduled task to run.cd/home/admin/Backup #切换到备份目录btimes=$(Date+%y%m%d%h%M) #定义备份时间agobtimes=$(Date-d-7day +%y%m%d%h%M) #定义删除七天前的备份RM-RF Allsql/vps_all_db_$agobtimes.Tar. GZ #删除操作 forDbinch'/usr/bin/mysql--user="Root"--password="123456"-b-n-E'SHOW DATABASES'|Xargs` Do(/usr/bin/mysqldump--user="Root"--password="123456"${DB} | /bin/gzip-9-> allsql/${db}.sql.gz) Done#遍列所有数据库并单个打包Tar-ZCF Allsql/vps7_all_d
Problem DescriptionAcmer in HDU-ACM team are ambitious, especially sh, he can spend time in Internet bar doing problems overnight. so far girls want to meet and Orz him. but Orz him is not that easy. you must solve this problem first. the problem is: Give you a sequence of distinct integers, choose numbers as following: first choose the biggest, then smallest, then second biggest, second smallest etc. until all the numbers was chosen. for example, giv
Excuse me: How can I use the SH script to extract the specified row from a file? -- Linux general technology-Linux technology and application information. For details, refer to the following section. File 1:
239526 121.229.53.235 11:19:54
303226 122.159.17.142 16:58:45
......
File 2:
116.21.145.143 239526, http://xxxx.com/cilpage/042.htm,20080822
221.210.29.20.1615383, http://xxxx.com/time/sg2007/news/client_news01.htm,20080822
....
To retri
#! /Bin/bash# The preceding line must exist. Otherwise, the PS displays bash rather than test. Sh.
Isprocrunning (){Echo "Check $1 is running or not"Local p = 'ps-C $1-O pid = '# If multiple processes with the same name are running, $ P for example: "1111 2222"For PID in $ P; doIf [$ PID-ne $]; then # Check whether the PS process is itself. This is required.Echo "another proc $ PID is running"Return 1ElseEcho "Local PID is $ PID"FiDoneReturn 0}
#
I have read several papers about sh lighting and the source. Comrades who have read the demo will be attracted by such good results, at least for an instant. Softshadow, interreflection, the most bt is that everything is realtime ......
[Add textures at home]
Comrades who have run the demo will surely be impressed with the super-horrible precompute before running. This is just a movie-level computing. So why can we put a lot of computing into pr
The following is the contents of the auto.sh file that was originally run under Linux and is now running under Windows Server. Installed the Cygwin,
#!/bin/sh
#
#Script to Export
#
While:;
Do
php-d session.save_path=/dev/null-f/www/test.php >/dev/null
Sleep 3
Done
Run times wrong
-bash-4.1$./auto.sh
./auto.sh:line 10:syntax error near unexpected tokens ' done '
./auto.sh:line: ' Done '
What is the reason? Did I not install the Cygwin without
Shell is a program for managing processes and running programs. All common shells have three main functions.
(1) run the program
Grep, date, ls, ECHO, and mail are common programs written in C and compiled into machine languages. Shell loads them into memory and runs them. Many people regard shell as a program starter.
(2) Manage Input and Output
Use the
(3) Programming
Shell is also a programming language with variables and flow control.
The main loop of a shell mainly executes t
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.