I'm using awk in a .ksh script to split one file by line prefix into different files (up to 4). The files are named after the prefix in the line, and a sequence no.
Is there any way to get the filenames in to variables too? I need _ftpfile1, _ftpfile2, _ftpfile3 and _ftpfile4 which are the results of the split from file _ftpfile.
Any ideas? Is this possible withing the awk? Or do I need to somehow search in the directory for the files?