Skip to content

Instantly share code, notes, and snippets.

@obfusk
Created May 28, 2024 20:05
Show Gist options
  • Save obfusk/51a84655edc2aa0925a72cc7df51ed30 to your computer and use it in GitHub Desktop.
Save obfusk/51a84655edc2aa0925a72cc7df51ed30 to your computer and use it in GitHub Desktop.
perl command to decrement numbers in a file
perl -pi -e 's/\b(\d+)\b/$1 - 1/e' file-with-numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment