| Start |
|---|
| Split a file Running the split command without any options will split a file into 1 or more separate files containing up to 1000 lines each. This will create files named To change the prefix, add your desired prefix to the end of the command line Now files named To specify the number of lines to output per file, use the OR Alternatively, you can specify a maximum number of bytes instead of lines. This is done by using the |
| We can use sed with w option to split a file into mutiple files. Files can be split by specifying line address or pattern. Suppose we have this source file that we would like to split: 1 On the Ning Nang Nong Command to split the file by line number: This writes line1 to line3 into file f1 and line4 to line7 into file f2, from the sourcefile. 1 On the Ning Nang Nong 1 There's a Nong Nang Ning Command to split the file by context/pattern: This splits the sourcefile into file1 and file2. file1 contains all lines that match Ning, file2 contains lines that match Ping. On the Ning Nang Nong Where the trees go Ping! |
Read Article
https://develop.horje.com/learn/1434/reference