Search and Replace Awk

June 20, 2008 – 17:46

a search and replace in a file where only items right of a seperator should be replaced:

  • awk ‘{FS = “=”;OFS = “=”;gsub(“course”, “module”, $2); print}’ moodle.php > moodle.php.new

Sorry, comments for this entry are closed at this time.