I have a text file that I need to split according to values in the 4th column of information. The script would need to split the lines of text according the the value of the first character of the text on that column and then split the file and save it to specified folders(different) under the original file name. for instance anything starting with the numbers 1 or 2 would be saved as file, anything starting with the number 4, 5 or 6 as another file and so on. Sample of file below:
0118844 10722 HAWKESBURY VALLEY MOTOR 624G05B 55567191 ROLLER TENSION
0118844 10722 HAWKESBURY VALLEY MOTOR 624G03A 92190654 LOCKING NUT
0118844 10722 HAWKESBURY VALLEY MOTOR 517A03A 92056367 RADIATOR CAP V6
0118844 10722 HAWKESBURY VALLEY MOTOR 416H04B 92044669 BONNET LOCK
0118844 HAWKESBURY VALLEY MOTOR 213F04D 8972138700 BOLT
0118844 HAWKESBURY VALLEY MOTOR 101B15A 8973628940 THERMOSTAT