0

几天前,我尝试创建一个 shell 脚本,它可以打开我下载文件夹中的所有种子文件。我不确定我是否正确写入了 sh 文件,从那时起我收到了以下消息:

Last login: Fri May 18 22:54:28 on ttys000
LSOpenURLsWithRole() failed for the application /Users/Alex/Downloads/(Demonoid.me)-Adobe_Master_Collection_CS5_(OS_X)__12302562.8934.torrent
with error -10810 for the files
/Users/Alex/Downloads/Coda_1_6_2_[_Plist]_[Serial]_O-Demonoid.me-O_12302562.8934.torrent,
/Users/Alex/Downloads/Coda_1_7_3_[k'd]-((Demonoid.me))_12302562.8934.torrent,
/Users/Alex/Downloads/[kat.ph]grid.systems.in.graphic.design.josef.muller.brockmann.torrent,
and /Users/Alex/Downloads/[kat.ph]pixie.lott.cry.me.out.mp3.housezz.torrent.
job done
/bin/bash: line 8: end: command not found

[处理完成]

我不能在终端做任何事情。我不知道该怎么办。关于它的任何见解?

4

1 回答 1

7
  • 打开一个终端并让它挂起。
  • 打开终端首选项菜单(Command-逗号)。
  • 在“启动”选项卡中,记住您当前的 shell 设置。
  • 选择 Bash 或 Sh 以外的 shell(例如/bin/tcsh,这是一种绝望的措施,而且只是暂时的)。
  • 关闭锁定的终端。
  • 打开一个新终端(Command-N)。
  • 那应该给你一个命令提示符。
  • 在该窗口中,编辑您的.profile.bashrc添加 Torrent 行的任何内容。
  • 删除 Torrent 相关的行。
  • 返回终端首选项。
  • 将外壳重置为/bin/bash.
  • 尝试再次打开终端窗口。

在尝试再次添加 Torrent 时,请编写一个 shell 脚本。调试它。仅当您确定它正确、稳定、可靠并且不会锁定您的终端时,才将其放入您的个人资料中。然后用已经打开的终端进行测试——打开一个新的终端进行测试。然后你仍然有一个解锁的终端,你可以解决问题。

如果您有图形 Vim(Gvim 或 MacVim),您可以启动它然后编辑您的.profile,而无需调整终端首选项。

于 2012-05-18T23:01:05.203 回答