It is my first time working with TextWrangler. I am using it to open a .sql file. But when I try to run the file I get the following error:
这是我第一次和TextWrangler合作。我正在使用它来打开一个.sql文件。但是当我试图运行文件时,我得到了以下错误:
This file doesn’t appear to contain a valid ‘shebang’ line (application error code: 13304)
I tried to look at some other posts on *, and I think I understood that the problem is the insertion of a line that contains the # symbol, but I cannot figure out how to fix it.
我尝试查看*上的其他一些帖子,我认为我理解问题是插入包含#符号的行,但是我不知道如何修复它。
The file starts like this:
文件的开头是这样的:
BEGIN TRANSACTION;
INSERT INTO ......
2 个解决方案
#1
2
Textwrangler is not a Database frontend nor can it execute SQL. You must specify a program to be executed when you select run from the menu. And this is done with the shebang line, which, for example, could be "#!/usr/bin/psql" (as first line of the file and w/o the quotes) if you want Postgresql's psql command to execute the SQL statements on a unixoid system.
Textwrangler不是数据库前端,也不能执行SQL。在从菜单中选择run时,必须指定要执行的程序。这是用shebang行完成的,例如,它可以是“#!”如果你想要Postgresql的psql命令来执行一个unix系统上的SQL语句,那么你可以使用/usr/bin/psql(作为文件的第一行和w/o)。
#2
1
if you want to run the file by terminal , you should save the file like file.py and not .txt...go to #! and choose run in terminal or you go in terminal and recall : python file.py
如果要按终端运行文件,应该像文件一样保存文件。py和不是. txt……去# !选择在终端上运行,或者在终端上重新调用:python file.py
i don't know if i helped somebody but i hope it :D
我不知道我是否帮助了某人,但我希望:D
#1
2
Textwrangler is not a Database frontend nor can it execute SQL. You must specify a program to be executed when you select run from the menu. And this is done with the shebang line, which, for example, could be "#!/usr/bin/psql" (as first line of the file and w/o the quotes) if you want Postgresql's psql command to execute the SQL statements on a unixoid system.
Textwrangler不是数据库前端,也不能执行SQL。在从菜单中选择run时,必须指定要执行的程序。这是用shebang行完成的,例如,它可以是“#!”如果你想要Postgresql的psql命令来执行一个unix系统上的SQL语句,那么你可以使用/usr/bin/psql(作为文件的第一行和w/o)。
#2
1
if you want to run the file by terminal , you should save the file like file.py and not .txt...go to #! and choose run in terminal or you go in terminal and recall : python file.py
如果要按终端运行文件,应该像文件一样保存文件。py和不是. txt……去# !选择在终端上运行,或者在终端上重新调用:python file.py
i don't know if i helped somebody but i hope it :D
我不知道我是否帮助了某人,但我希望:D