I need to take the first 3 files from a directory starting with letter b in alphabetical order to another directory. I've come up with this command:
find /users/students/ejackson/A3-ejackson-55688-114906/CS282in \
-name "b*" | sort | head -3
And it produces the proper files, but I can't do anything with them. Ideally I'd just pipe the output of the above command to mv
, but I don't think that's possible.
(P.S. I have to do this without grep
, sed
or awk
)