This would be a solution following your idea with grep and xargs:
#!/bin/bash
mkdir hello-world
grep -l hello * | xargs mv -t hello-world
This would be a solution following your idea with grep and xargs:
#!/bin/bash
mkdir hello-world
grep -l hello * | xargs mv -t hello-world