: This article mainly introduces the php excel reading method. if you are interested in the PHP Tutorial, refer to it. The following three methods are commonly used to read EXCEL using PHP, which have their respective advantages and disadvantages. I
The PHPfgetcsv () function reads a row from the file pointer and parses the CSV field. Similar to PHPfgets (), the difference is that PHPfgetcsv () parses the rows read and finds fields in CSV format, and then returns an array containing these
Sort commandSort : Text sort, just the sort of display files, without affecting the order of source files, is based on assii codethe word Fu Shen order to arrange. -N: Installation values are arranged from small to large, ascending by default. - R:
The construction process of the statistical analysis system, which is completely independently completed, is mainly used in the Php+hadoop+hive+thrift+mysql realization
Installation
Hadoop Installation:
awk ToolsAwk is also a good data-processing tool. Awk tends to divide a line into several fields to deal with the processing of an entire line compared to SED. As a result, awk is quite suitable for small data processing. The usual mode of operation
awk commandawk [Options] '/pattern{action} 'Options-fWork Traversal mode: iteration, loopPatternDelimitation: ADDR1,ADDR2Expression: $ > 500/pattern/modebegin{}: Executes once before the traversal operation beginsend{}: After the traversal operation
Text viewing and processing tools:WC [OPTION] FILE ...-C: Number of bytes-L: Number of rows-W: number of wordsW.H.O. | Wc-l: View current number of usersCut [OPTION] FILE ...-D CHAR: Specify field delimiterIf this option is not added, the default is
工欲善其事, its prerequisite. Learning SQLite's command-line tools is very helpful for us to learn about SQLite itself. The basic one is that it makes the process of learning sqlite easier and more enjoyable. Let's go back to the official website of
UsageAwk '{pattern + action}' {filenames}Although the operation may be complex, the syntax is always like this. pattern indicates the content that AWK searches for in the data, and action is a series of commands executed when matching content is
A few text-processing gadgets: TR, Wc,cut,sort,uniq1. The TR command can replace, compress, and delete characters from standard input. It can turn a set of characters into another set of characters, often used to write graceful single-line commands,
During website construction, some data is often imported and exported. In Mysql database, there are two ways to process data export (generally ).1. Use select * from table_name into outfile "file_name ";2. Use the mysqldump utilityThe following is
First, sortSort based on different data typesSort [-bcfmnrtk][source file][-o output file]Sort by default by a-Z-U Go Heavy-O outputs the content to the specified file-R Descending-N Sort By value-t Specifies the separator-K Specified interval-F
Create a file and directory1 Touch Touch is intended to modify the timestamp of the file, but you can create a new file if the file does not exist.-A modifies the file's access time, which is the modification to read the file or to execute the file
The Awk tool, which primarily divides a line into "fields" to handle.awk ' condition type 1{action 1} condition type 2{action 2} ... ' filenameAwk primarily handles data in the fields of each row, and the default field delimiter is the SPACEBAR or
Command: Fputcsv ()
Command format: int fputcsv (resource handle [, array fields [, String delimiter [, String enclosure]])
Command parsing: fputcsv () formats a row (passed in the fields array) in CSV format and writes the file specified by handle.
if (mkdir ("./path", 0700))//Create the path directory in the current directory
echo "created successfully";
?>
Copy Code2. Get and change the current directory using the GETCWD () function to get the current working
Find if all files in the directory contain a stringFind. | Xargs Grep-ri "IBM"Finds all files in the directory that contain a string, and prints only the file nameFind. | Xargs Grep-ri "IBM"-l1. Regular expressions(1) Regular expressions are
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.