Skip to content

Instantly share code, notes, and snippets.

View spuk-'s full-sized avatar

Spuk spuk-

  • Curitiba-PR, Brasil
View GitHub Profile
@spuk-
spuk- / bash
Last active May 14, 2019 19:22 — forked from franklinbr/bash
#!/bin/bash
arquivo_entrada='script.sql'
arquivo_tmp='temporario.sql'
arquivo_saida='saida.sql'
cp "$arquivo_entrada" "$arquivo_saida" && sed -e "2,\${`head -n1 "$arquivo_entrada" | sed -r -e 's/, /\n/g' | while read var x val; do echo -n "s/$var\\>/$val/g;"; done`}" "$arquivo_saida"