在ubuntu

时间:2017-06-09 15:25:09

标签: linux imagemagick

我已经在Windows上安装并使用了Image Magick并且工作正常。现在我试图让它运行并将其安装在我的Ubuntu实例上。 我通过简单的"转换"验证了它的工作原理。测试样本图像。 现在我发现这个站点有基于Unix的有用脚本。 http://www.fmwconcepts.com/imagemagick/textcleaner/index.php

我的问题是如何运行其中一个脚本。我复制了例如" textcleaner"脚本到我的主文件夹/usr/home

如何根据Usage说明运行脚本?

USAGE: textcleaner [-r rotate] [-l layout] [-c cropoff] [-g] [-e enhance ] [-f filtersize]
[-o offset] [-u] [-t threshold] [-s sharpamt] [-s saturation] [-a adaptblur] [-T]
[-p padamt] [-b bgcolor] infile outfile

当我从同一文件夹中运行命令时,textcleaner脚本存储在命令" textcleaner"它什么都不做,只是消息"命令未找到"
所以这是一个关于我如何注册这个脚本的问题,如果这是正确的说法。

1 个答案:

答案 0 :(得分:2)

您需要使脚本可执行。

chmod +x textcleaner

然后直接用...

执行
./textcleaner [options]

如果您想在系统范围内使脚本可用,只需将其安装到/usr/local/bin

sudo cp -p ./textcleaner /usr/local/bin/textcleaner
# Or even just
sudo install textcleaner /usr/local/bin
相关问题