I have a directory of files, each file has a header that contains either cat=a, cat=b, or cat=c
I need to move each file to a different directory that corresponds with it's category.
I've been playing with this for the last while, and it's easy enough to sort out the files I want. head -n 1 * | awk '/cat=A/' But I can't seem to make the leap that lets me move the files from this output to a different directory.
Thanks
I need to move each file to a different directory that corresponds with it's category.
I've been playing with this for the last while, and it's easy enough to sort out the files I want. head -n 1 * | awk '/cat=A/' But I can't seem to make the leap that lets me move the files from this output to a different directory.
Thanks