Skip to main content
added 80 characters in body
Source Link
Gilles 'SO- stop being evil'
  • 865.5k
  • 205
  • 1.8k
  • 2.3k

UseIf your file names don't contain any special characters (whitespace or \[*?), use command substitution:

mv `grep -lir 'string' ~/directory/*` destination/

Use command substitution:

mv `grep -lir 'string' ~/directory/*` destination/

If your file names don't contain any special characters (whitespace or \[*?), use command substitution:

mv `grep -lir 'string' ~/directory/*` destination/
Source Link
ire_and_curses
  • 12.5k
  • 3
  • 41
  • 35

Use command substitution:

mv `grep -lir 'string' ~/directory/*` destination/