Skip to content

Instantly share code, notes, and snippets.

@camsaul
Created October 3, 2014 23:13
Show Gist options
  • Save camsaul/8cd3144edf07657f4fcf to your computer and use it in GitHub Desktop.
Save camsaul/8cd3144edf07657f4fcf to your computer and use it in GitHub Desktop.
Perl replace one-liner
TABLE="DROP TABLE public.timeseries_metriccomment;"
echo $TABLE | perl -ne 's/(^DROP TABLE.*);/$1 CASCADE;/, print'
# -> DROP TABLE public.timeseries_metriccomment CASCADE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment