自己的shell script - Linux

By Suhail Hany
at 2012-09-01T22:26
at 2012-09-01T22:26
Table of Contents
版上似乎很少人分享shell script
各位自己寫和常用的script有哪些呢?
像我有個叫realmansearch(!)的script
http://pastebin.com/PEF7paAv
可以在terminal裡打 realmansearch og ptt
就會在firefox幫你google ptt (og = open google)
打realmansearch toy foo
會幫你開一個新的分頁後在youtube搜尋foo (toy = tab open youtube)
然後wow (window open wikipedia) oap (open archlinux package)等等
用的時候我是把realmansearch og alias成 og 這樣打指令比較快
另外我用mpd聽音樂 看youtube時用youtube-viewer(可以不用進youtube網頁)
可是逛ptt時遇到youtube連結要暫停音樂很麻煩
所以我寫了個urlfilter http://pastebin.com/aD6RdYrn (dependency: bc mpc)
把urlfilter設成terminal開啟連結的預設軟體
這樣開youtube以外的連結就開firefox
而開youtube連結會暫停正在聽的音樂->看影片->回復之前暫停的音樂
為了不傷耳朵還另外多寫了fade in/out的功能
拋磚引玉一下XD 希望看到各式各樣方便的script
--
各位自己寫和常用的script有哪些呢?
像我有個叫realmansearch(!)的script
http://pastebin.com/PEF7paAv
可以在terminal裡打 realmansearch og ptt
就會在firefox幫你google ptt (og = open google)
打realmansearch toy foo
會幫你開一個新的分頁後在youtube搜尋foo (toy = tab open youtube)
然後wow (window open wikipedia) oap (open archlinux package)等等
用的時候我是把realmansearch og alias成 og 這樣打指令比較快
另外我用mpd聽音樂 看youtube時用youtube-viewer(可以不用進youtube網頁)
可是逛ptt時遇到youtube連結要暫停音樂很麻煩
所以我寫了個urlfilter http://pastebin.com/aD6RdYrn (dependency: bc mpc)
把urlfilter設成terminal開啟連結的預設軟體
這樣開youtube以外的連結就開firefox
而開youtube連結會暫停正在聽的音樂->看影片->回復之前暫停的音樂
為了不傷耳朵還另外多寫了fade in/out的功能
拋磚引玉一下XD 希望看到各式各樣方便的script
--
Tags:
Linux
All Comments

By Joe
at 2012-09-05T16:44
at 2012-09-05T16:44

By Adele
at 2012-09-09T15:26
at 2012-09-09T15:26
Related Posts
script 判斷ubuntu 套件

By Tristan Cohan
at 2012-09-01T21:12
at 2012-09-01T21:12
關於sun的java和chrome

By Delia
at 2012-09-01T19:01
at 2012-09-01T19:01
設定 MySQL Replication 同步單一資料庫

By Linda
at 2012-09-01T08:50
at 2012-09-01T08:50
不好意思想問VI搜尋取消的新手問題

By Eden
at 2012-08-31T15:09
at 2012-08-31T15:09
不好意思想問VI搜尋取消的新手問題

By Michael
at 2012-08-31T14:07
at 2012-08-31T14:07