【问题标题】:Mac OS X: How to get result of otool inside a script?Mac OS X:如何在脚本中获取 otool 的结果?
【发布时间】:2018-02-26 16:45:11
【问题描述】:

我想在脚本中更改 dylib 搜索路径。 在终端中我使用 otool -L my.dylib,然后查看搜索路径是什么并使用 install_name_tool 更改它。 install_name_tool (-change) 使用以前的路径和新路径作为参数。 如何将 otool -L 的结果获取到脚本变量?

【问题讨论】:

    标签: bash macos otool install-name-tool


    【解决方案1】:

    如何将 otool -L 的结果获取到脚本变量中?

    从脚本运行 otool:

    OUTPUT=$(otool -L /Applications/Calculator.app/Contents/MacOS/Calculator)
    echo $OUTPUT
    

    【讨论】:

      猜你喜欢
      • 2015-03-20
      • 1970-01-01
      • 2019-08-05
      • 2011-05-27
      • 2011-02-07
      • 1970-01-01
      • 2015-12-04
      • 2011-02-20
      • 2012-03-05
      相关资源
      最近更新 更多