Also
2008年12月12日 星期五
Linux 文字編輯常用指令
http://linux.vbird.org//linux_basic/0330regularex.php
=============================================
grep--找行資訊
===================================================
sed--處理行資料
's/?/0/g' 將?取代成0
From 藍森林某位好心人士的解答
1.行變列
[code]echo 145263258|sed 's/./&\n/g'
1
4
5
2
6
3
2
5
8
or
echo "123 456 789"|sed 's/ /\n/g' (\n 是斷行)
123
456
789
====================================
awk --處理列資料
1. 在第三列前插入整列 1
awk '{print $1-2,1,$3}' files name
列變行(使用了中間臨時文件)
[code]awk '{for(i=1;i<=NF;i++)printf"echo %s >>t_tmp%d\n",$i,i}' filename|sh
for i in t_tmp?;do echo `cat ${i}`;rm ${i};done[/code]
測試
[code]cat filename
123 456 789
123 456 789
123 456 789[/code]
結果:
[code]123 123 123
456 456 456
789 789 789[/code]
2008年6月25日 星期三
好男人?壞男人?
卻不知道
好男人都被壞女人搶走了
男人之所以成為好男人是因為遇到壞女人
一個好男人如果遇到一個好女人
那他就再也不是好男人
而只會成為一個壞男人
所以男人之為好壞...全取決於女人
所以天下只有好女人跟壞女人...卻沒有好男人或是壞男人
不要打我
2008年5月29日 星期四
Tvants in eee pc
install wine
download tvants
open console
type => wine "c:\Program Files\Tvants\tvants"
click the tv you want to watch
it will show a link and open in your firefox
copy this link ( something like => http://localhost:16900/1.asf )
and open in the smplayer
watch TV!!
mount 網路芳鄰
2) Select 'Tools' then 'Mount Network Drive' which opens a new window
3) In new window navigate to the shared folder on the Windows machine and select this
4) When it asks to create a Folder say 'yes' and a new folder will be created in your 'My Home' folder tree on the EEE
5) Select files via these new folders and there's no problem
Thank EeesyRiderUK
2007年10月24日 星期三
linux-ubuntu之旅-17-virtualbox
今天介紹virtual box, 像vmware的軟體
免費的..很好用
用 sudo apt-get install virtualbox
就裝好了..使用方法也跟vmware差不多
不要忘了要去
裝置-->安裝客端額外功能
會讓你的虛擬xp更好用....
2007年9月23日 星期日
歐元走了
歐元走了..歐元是我們家的黃金鼠..
說起她的故事可真是精彩到不行..
從她的出現便充滿了讓人不可置信的傳奇性
你能想像一隻黃金鼠會自己破牆而入跑到妳家的浴室嗎..
是的..她的到來便是這麼的戲劇性...
話說..在當時還是我女朋友的老婆家的浴室..
一直傳出不知道從哪裡發出來的聲音..
嚇的她跟她妹都用跑百米的速度在洗澡...
終於在第三天的晚上..確認的聲音是從洗手台下面傳出來
我老婆鼓起勇氣..把洗手台下面櫃子的門打開
就發現一直黃金鼠用著鼓嚕嚕的眼睛望著她..
略微圓滾滾的下半身和短小的上肢..
那站立的樣子就好像一隻小兔子盯著妳看...
雖然她的爪子因為挖了三天的牆而有著些許的傷口..
那一副歷經滄傷..重返光明的模樣..說有多可愛就有多可愛...
再貼了幾天的尋鼠公告卻沒有人回應的情況下
她理所當然的被我老婆和她妹妹給扶養了..
而且由於當初歐元是一陣看好..我那老婆就決定要讓他當最值錢的鈔票
也註定了他開始過好日子的下半身...
吃好的用好的..還有人天天陪她玩..
我想她心中一定也覺得當初三天的努力挖牆..代價是絕對值得的..
從此之後..我在我老婆心中再也不是第一順位..
取而代之的是一隻遠遠比不上我堂堂七尺之軀男兒身的小老鼠
後來..因為我跟老婆結婚..歐元也就順理成章來到我們家..
雖然她跟她的主人一樣沒有冠夫姓...可是在家中的地位卻是高高在上
想要出遠門..第一件事就是考慮到歐元怎麼辦..
有人可以照顧她嗎?飼料放的夠不夠多呢?歐元會不會太無聊?
我雖然心中抱怨..卻也不得不承認..她真的很可愛...
就這樣兩人一鼠的過了九個月..
本來半夜活蹦亂跳..猛跑輪子和狂咬籠子的歐元
突然懶洋洋的...什麼都不做...
就這樣懶洋洋的過了大半個月..
某一天歐元的陰部就開始流血..
一開始我們以為是歐元的MC來了...
可是後來越來越覺得不對勁...
因為量也太多了...
儘管她是一隻過胖的黃金鼠...
可是這樣還是很不對勁的....
但是我們也不知道該怎麼辦...
於是決定繼續觀察一下...看看情況是否會有好轉...
可是過了兩三天..還是血留不止..
而且歐元看起來越來越虛弱....
而在這兩三天之中...我們也數度拜訪google大神
請示看看歐元到底是什麼樣...
後來我們得到明示...歐元應該是得了子宮腫瘤...
大概除了開刀之外...應該沒有什麼辦法可以拯救了
在極度傷心和不知所措之下...
我們決定帶歐元去看醫生....
於是在一大早...pets mart一開門的時候
我們馬上成為第一個顧客...
雖然是來看病的....
而我們家這隻愛現小老鼠...雖然這幾天很虛弱
可是一發現很多人在看他...居然還是滿桌的爬來爬去...
然後還一邊流血...真是太愛現了
結果最後醫生的結論跟我們google大神的開示是一樣的...
宣判歐元得了子宮腫瘤...問我們要不要給他開刀...
可是歐元已經很老了...大概也活不過半年了吧
我覺得開刀實在太折磨她了..所以並不是很考慮
於是問醫生...如果不開可以活多久...
醫生說像她這樣大隻..而且還滿有活動力的..大概還可以兩三個月吧...
我想..那就讓他安穩的過個兩三個月吧..決定不開....
然後醫生就給他打了一針抗生素...
希望不會引起其他感染...
我跟老婆在回來的路上..還在想說要怎樣幫助歐元..
我們決定給他天天喝牛奶..和吃維他命..看看能不能延續久一點
誰知道..回來之後..歐元越來越虛弱..一點也沒有好轉的跡象...
已經整隻都趴在籠子裡..動都不太動...東西也都不吃了
我跟老婆都覺得可能撐不過晚上了..還衝出去買了鏟子回來...
然後剩下的時間都在陪歐元...
看著她這樣虛弱...真的是很難過..
而且傍晚的時候...歐元大概知道自己快不行了
於是爬到門邊來看我們...
然後奮力的爬上她的圈圈...中間還摔倒了兩次...
然後費力的走了兩圈給我們看..因為她知道我們最愛看她跑圈圈...
我想她也想在死前再表演一次給我們看吧
看她步履蹣跚的模樣..我的眼角不禁已經泛淚了...
更別說在旁邊已經哭的不像樣的老婆了...
終於...在晚上11點多的時候...歐元走了...
好難過..真的好難過....
不過我相信..在另一個世界..歐元會更好 ....
而且還是一樣可愛...
從無名搬家到blogger
2007年1月16日 星期二
linux-ubuntu之旅-16-mac 化
圖示..
http://www.gnome-look.org/content/show.php/Humanoid-OSX?content=35753
從這裡download..還有點像mac
按「安裝佈景主題」,不用解壓縮,直接選就行了..兩個都裝
2007年1月15日 星期一
linux-ubuntu之旅-15-好用的軟體集合包-Automatix
Automatix是一個軟體整合包,裡面包的都是最實用的軟體,像看divx、燒錄軟體、抓P2P/BT、skype等等
安裝說明:http://www.getautomatix.com/wiki/index.php?title=Installation
First Step:
echo "deb http://www.getautomatix.com/apt feisty main" | sudo tee -a /etc/apt/sources.list
Second Step:
wget http://www.getautomatix.com/keys/automatix2.key
Third Step:
gpg --import automatix2.key
Fourth Step:
gpg --export --armor E23C5FC3 | sudo apt-key add -
Fifth Step:
sudo apt-get update
Sixth Step:
sudo apt-get install automatix2
2007年1月14日 星期日
linux-ubuntu之旅-14-SSH
圖形化傳檔
sudo apt-get install gftp
連線時記得改成SSH2
然後在終端機開啟文字連線..
請在終端機輸入
ssh -l username host.name.domain
done
2007年1月13日 星期六
linux-ubuntu之旅-13-R (statistical software)- GUI
February 2nd, 2007, 06:53 PM
I am running Xubuntu dapper on an iMac G3.
I installed R through Synaptic by marking r-base for installation. Synaptic marked a number of dependent packages, and I installed them all.
However R did not show up in my applications menu. I can start R in a terminal through the command line, but it only comes up in the terminal - R does not open in its own window.
Should I have selected a GUI to install for R? What file should I install for this?
R does not have a GUI. It strictly a CLI based environment. There are other packages that have been developed to try and put a GUI on top of R, but I don't know if any of them are in the Dapper repos.
Three such 'add-ons' are:
Rcmdr: R commander - run R as root, and install it from CRAN using the following commands (one line at a time):sudo R
install.packages('Rcmdr')
q()
A window will come up asking you to choose a mirror. Choose one and the package should get installed. After installation, quit R with the q() command. You can then run R again as normal user and load the Rcmdr GUI with the command R
library(Rcmdr)
JGR: Java GUI for R - JGR is java based, and so should be platform independent. Google it and you should get to the home page. I've never actually tried it.
Rkward: This one looks the most promising, but it still looks like its early in development. Not sure if there are Dapper .debs available or not.
thePsychologist
February 4th, 2007, 03:07 PM
R comes with it's own window which uses Tcl/Tk which can be started by the command:
R --gui=Tk
Which allows you to select mirrors, etc. not really useful in my opinion. There are some other GUIs, and aside from the ones already mentioned you can look at some other ones:
http://www.sciviews.org/_rgui/
RKWard is probably the most developed, and I think it's a KDE app. Check it out. http://rkward.sourceforge.net/. There's a deb file you can download too.
Linux 文字編輯常用指令
一定要看 http://linux.vbird.org//linux_basic/0330regularex.php ============================================= grep--找行資訊 ========================...
-
先裝gftp 圖形化傳檔 sudo apt-get install gftp 連線時記得改成SSH2 然後在終端機開啟文字連線.. 請在終端機輸入 ssh -l username host.name.domain done ...
-
linux-ubuntu之旅-17-virtualbox 今天介紹virtual box, 像vmware的軟體 免費的..很好用 用 sudo apt-get install virtualbox 就裝好了..使用方法也跟vmware差不多 不要忘了要去 裝置-->安裝客...