Learn about convert shell script to batch file online, we have the largest and most updated convert shell script to batch file online information on alibabacloud.com
Reprint Address: http://www.cnblogs.com/pipelone/archive/2009/04/17/1437879.htmlExecutes. sh script in Linux, exception/bin/sh^m:bad interpreter:no such file or directory.Analysis: This is caused by different system encoding formats: the. sh file that is edited in the Windows system may have invisible characters, so the above exception information is reported in
Solution for "bad interpreter: Text file busy" during shell script execution, interpreterbusy
When executing a shell script, an error message "-bash:./killSession. sh:/bin/bash: bad interpreter: Text file busy" is displayed, as s
[InternetShortcut]URL=http://www.baidu.com/IDList=BEST=0[{000214A0-0000-0000-C000-000000000046}]Prop3=19,2
The above is the code for opening the Baidu shortcut file in text format saved in windows. The format of all URL files is basically the same. The first two lines are the same, and the following are slightly different.The task is to get the URL and open it in a browser. You can use the following method to read a specified row from a
Demand
Sometimes in the shell script needs some execution, if placed in the program is not easy to unified management, and every time you modify the path to the script inside to change the trouble, so the unified path in the configuration file easy to manage.
Problem
How to read the corresponding Key-
In order to locate the problem, we need to locate the running log or error message of the task.When some scripts are called through the shell, the log information is printed in the shell. However, there are users in the shell call normal, but to crontab call when the error and no log.In response to this situation, the output of the task execution can be recorded
File Operations
Get directory content
Ls
Getconf ARG_MAX
Determine whether a file exists
Create a file
Create a general file:
Create a file
1 use the redirection output:> text.txt
2. Use the NULL command:> test. xtx to increase script
Tags: logical judgment file directory properties in shell scripts determine if special usage case judgment68. Logical judgment in shell script, file directory attribute judgment, if special usage, case judgmentI. Logical judgments in she
Sometimes run a shell script error, generally can not find the shell file, mostly because the script is generated under Windows and then copy to Linux, with the following command check:
$ head-1 Yourscript | Od-c
And the IT ends:this is wrong
0000000 # ! / b i n
(I am participating in the 2015 blog Star Selection, invite you to vote, thank you: HTTP://VOTE.BLOG.CSDN.NET/BLOGSTAR2015/CANDIDATE?USERNAME=ZHOUZXI)Recently, in the process of development work, a requirement was encountered: A shell script was used to read the configuration file and the Read configuration item was written to a new file.To complete this requirem
In the use of flume found due to network, HDFs and other reasons, so that after the flume collected to the HDFs log some anomalies, performance as:1. Files that have not been closed: Files ending with tmp (default). Added to the HDFs file should be a GZ compressed file, the file with the end of TMP can not be used;2, there is a size of 0 files, such as GZ compres
Today, the company asked me to copy the backup files on the server to the internal server, and as long as they are up-to-date, well, what is the ideal goal of O M personnel, that is, what can be done by computers, never do it by yourself.System: centos 5.9Environment: The backup file is under/root/bak. Of course, I tested it on a virtual machine.1. Backup file environment diagram2.
Tags: Shell alarm systemAlarm SystemFirst, the alarm system main script(Script storage Address:/usr/local/sbin/)1. Create a script to store the directory: mkdir /usr/local/sbin/mon/ 1.1 creating directories for each functional module---storing scripts CD /usr/local/sbin/mon/ mkdir bin conf shares
My college classmates asked me a script question, presumably the need is to see all the ports open, but also to know the application path of each port, and to be flush with the previous data, is to add a column of data. I butt eyes, very easy, but because of the busy, so I said at noon to send him the past, but to his own writing, all kinds of problems ah, the use of awk find and find, have to say awk is very great, the
I wrote a shell script to modify the suffix and learned it with everyone.Below isSource code: The copy storage is myrename. Sh, which can be used in full accordance with the instructions.Here, I would like to remind beginners that single quotation marks and reverse quotation marks (the one on the left of keyboard 1) are different. For example, FF = 'ls | grep * is used here *. $ 1', which is a quotation mar
The shell script automatically backs up the file and sends it to Gmail.1. Install the required Program
Yum install-y mutt vixie-cron
2. Set the mutt sending Parameters
$ Vim ~ /. Muttrc
Write the following content
Set envelope_from = yes
Set from = bak@diavps.com
Set realname = "DiaBak"
Set use_from = yes
Then set Gmail to receive the mail and add the
How can I solve the problem of shell script reading the configuration file www.2cto.com? I have a configuration file config with the Content ID = 123IP = 192.168.3.154Name = test and want to write a shell script, give the values o
Function libraries, signals and traps, file processing, arrays, and security for advanced shell script Programming
1. The function library puts all the functions that need to be used into a file, and each script starts with this file
Shell command line, one-click creation of python Template File Script method, shellpython
When writing a python file, each file must start with a version and code. Every time I paste these two sentences after the touch file, I wi
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.