I have different files in some older data.
They are in the same folder.
These are grouped by the prefix.
I want to move all the files that start with the same prefix in the folder named after the same prefix.
/ Div>
As a starting point, how a LS-1 list of all files, piping all To get unique prefixes, a awk command:
xxx yyy zzz www ... Again, output of Use the prefix directory to create and all files by this @nofl ebrah As suggested by the word awk is suggested through the Commands and Loop:
mkdir $ {prefix} & amp; Amp; Mv $ {prefix} * prefix I am not an over-expert, but on top of my head, I am thinking that anything on the AVP script would be:
Start BEGIN {// associative array $ x} {$ x [prefix ($ 0)] = 1; } END {// $ x foreign currency key: print $ key}
Comments
Post a Comment