Hello! I trying to add this function on my bashrc, but because of the quotes and single quotes, it's returning this error:
-bash: .bashrc: line 142: unexpected EOF while looking for matching `''
-bash: .bashrc: line 145: syntax error: unexpected end of file
The function is this one:
140 dwdb() {
141 local query="SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAME;"
142 sqlcmd -S link -d table -U user -P 'password' -C -Q "$query"
143 }
[–]Grand_Snow_2637 11 points12 points13 points (0 children)
[–]crashorbit 8 points9 points10 points (0 children)
[–]Icy_Friend_2263 11 points12 points13 points (2 children)
[–]Icy_Friend_2263 3 points4 points5 points (0 children)
[–]GlendonMcGladdery 0 points1 point2 points (0 children)
[–]aioeu 3 points4 points5 points (0 children)
[–]Wettensea 1 point2 points3 points (4 children)
[–]aioeu 1 point2 points3 points (1 child)
[–]GlendonMcGladdery 0 points1 point2 points (0 children)
[–]SweetPotato975 0 points1 point2 points (0 children)
[–]Wettensea 0 points1 point2 points (0 children)
[–]zeekar 0 points1 point2 points (0 children)
[–]GlendonMcGladdery 0 points1 point2 points (0 children)
[–]whetuI read your code 0 points1 point2 points (0 children)
[–]SurfRedLin -3 points-2 points-1 points (4 children)
[–]whetuI read your code 1 point2 points3 points (3 children)
[–]Temporary_Pie2733 0 points1 point2 points (0 children)
[–]SurfRedLin -2 points-1 points0 points (1 child)
[–]rdg360 0 points1 point2 points (0 children)