Change 33528

tom_tyler (C. Thomas Tyler)
C. Thomas Tyler committed this change into //p4-hms/dev/tools
Request Review
Download .zip
Add sed_fixer.sh: bulk grep+sed file editor with P4 checkout integration

Finds files matching a grep expression and applies one or more sed
substitution expressions to each (all passed as -e options to a single
sed invocation, not a separate command per expression), checking out
each file via p4 edit first. Works with both GNU and BSD/macOS sed.

Adds '-dir <dir>' to operate on a directory tree other than the default
(one level above the invocation directory), and '-nop4' to disable all
Perforce interactions (auto-implied if 'p4 info' does not respond), so
the script can be tested against a scratch directory or DVCS repo
without touching a real server workspace.
  • Files 1
  • Comments 0
0 edited 1 added 0 deleted
sed_fixer.sh#1
Loading...
Tip: Use n and p to cycle through the changes.