-
-
Save spuk-/b391d834d8f22daa49164bc4d7eb3bb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment