亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 10628 | 回復(fù): 6
打印 上一主題 下一主題

[其他] 如何把多行命令寫成一行 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2013-09-26 18:13 |只看該作者 |倒序?yàn)g覽
bash -c ""xxxx"
xxxx可以變成一行

如何把下面的變成一行?

rose: -colors 256 -format %c histogram:info:- |
    sed 's/:.*#/ #/' |
      while read count color colorname; do
        convert -size 1x$count xccolor miff:-
      done |
        convert - -alpha set -gravity south -background none +append \

如果全部變成一行,會(huì)提示count未知

論壇徽章:
39
辰龍
日期:2013-08-21 15:45:192015亞冠之廣州富力
日期:2015-05-12 16:34:52亥豬
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17雙魚座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亞冠之卡爾希納薩夫
日期:2015-05-24 15:24:35黃金圣斗士
日期:2015-12-02 17:25:0815-16賽季CBA聯(lián)賽之吉林
日期:2017-06-24 16:43:52
2 [報(bào)告]
發(fā)表于 2013-09-26 18:24 |只看該作者
目測(cè)直接拼接就行:
  1. rose: -colors 256 -format %c histogram:info:- |sed 's/:.*#/ #/' |while read count color colorname; do  convert -size 1x$count xccolor miff:- ;done | convert - -alpha set -gravity south -background none +append \
復(fù)制代碼

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2013-09-26 18:32 |只看該作者
回復(fù) 2# 關(guān)陰月飛

  1. bash -c "convert fd73a7524a1b2f184f296ba158cf1bb2_a.jpg rose: -colors 256 -format %c histogram:info:- |sed 's/:.*#/ #/' |while read count color colorname; do  convert -size 1x$count xccolor miff:- ;done | convert - -alpha set -gravity south -background none +append \ a.png"
復(fù)制代碼
提示以下錯(cuò)誤
  1. count: Undefined variable.
復(fù)制代碼
存成腳本文件運(yùn)行都正常

論壇徽章:
39
辰龍
日期:2013-08-21 15:45:192015亞冠之廣州富力
日期:2015-05-12 16:34:52亥豬
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17雙魚座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亞冠之卡爾希納薩夫
日期:2015-05-24 15:24:35黃金圣斗士
日期:2015-12-02 17:25:0815-16賽季CBA聯(lián)賽之吉林
日期:2017-06-24 16:43:52
4 [報(bào)告]
發(fā)表于 2013-09-26 19:04 |只看該作者
回復(fù) 3# flfqzrj

先轉(zhuǎn)義一下:
convert -size 1x\$count xccolor miff:- ;done   

或者直接用單引號(hào)試試:

bash -c  ' .....  '

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2013-09-26 19:23 |只看該作者
本帖最后由 flfqzrj 于 2013-09-26 19:24 編輯

回復(fù) 4# 關(guān)陰月飛

先輸入
  1. bash
復(fù)制代碼
然后再輸入
  1. convert aee33fe9e127832bd9af2e306b985f5e_a.jpg \
  2. rose: -colors 256 -format %c histogram:info:- |
  3.     sed 's/:.*#/ #/' |
  4.       while read count color colorname
  5.       do
  6.         convert -size 1x$count xc:$color miff:-
  7.       done |
  8.         convert - -alpha set -gravity south -background none +append \
  9. b.png
復(fù)制代碼
一切都正常

在bash模式下輸入
  1. convert aee33fe9e127832bd9af2e306b985f5e_a.jpg rose: -colors 256 -format %c histogram:info:- |     sed 's/:.*#/ #/' |       while read count color colorname;       do         convert -size 1x$count xc:$color miff:-;       done |         convert - -alpha set -gravity south -background none +append  b.png
復(fù)制代碼
也正常

就是用指令
  1. bash -c "convert aee33fe9e127832bd9af2e306b985f5e_a.jpg rose: -colors 256 -format %c histogram:info:- |     sed 's/:.*#/ #/' |       while read count color colorname;       do         convert -size 1x$count xc:$color miff:-;       done |         convert - -alpha set -gravity south -background none +append  b.png"
復(fù)制代碼
錯(cuò)誤



   

論壇徽章:
39
辰龍
日期:2013-08-21 15:45:192015亞冠之廣州富力
日期:2015-05-12 16:34:52亥豬
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17雙魚座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亞冠之卡爾希納薩夫
日期:2015-05-24 15:24:35黃金圣斗士
日期:2015-12-02 17:25:0815-16賽季CBA聯(lián)賽之吉林
日期:2017-06-24 16:43:52
6 [報(bào)告]
發(fā)表于 2013-09-26 19:27 |只看該作者
回復(fù) 5# flfqzrj



回復(fù) 3# flfqzrj

先轉(zhuǎn)義一下:
convert -size 1x\$count xccolor miff:- ;done   

或者直接用單引號(hào)試試:

bash -c  ' .....  '   

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2013-09-27 15:54 |只看該作者
回復(fù) 6# 關(guān)陰月飛


bash -c 不支持 '符號(hào),只能使用"

   
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP