tag:blogger.com,1999:blog-7188813081599719537.post1569862131110973248..comments2024-02-24T10:09:27.699+07:00Comments on FAMILUG: Xử lý text trên LinuxAnonymoushttp://www.blogger.com/profile/08856674198501587219noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7188813081599719537.post-3870973723013022402013-06-20T17:04:05.074+07:002013-06-20T17:04:05.074+07:00regex mà thuộc class Mathdata thì cũng hay phết nh...regex mà thuộc class Mathdata thì cũng hay phết nhỉ :x Hhttps://www.blogger.com/profile/18301396724192709702noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-53608374745018078332013-06-20T14:36:00.525+07:002013-06-20T14:36:00.525+07:00puts system "git clone "+repo.to_s
cái...puts system "git clone "+repo.to_s <br /><br />cái repo lấy từ regex ra nên thuộc kiểu (thuộc class) Mathdata. Dùng to_s để convert sang string.<br />puts system là in kết quả của lệnh git ra màn hình.<br />Hoặc đơn giản hơn thì dùng<br />`git clone #{repo.to_s}`<br /><br />không bắt exception, nếu tạo lỗi thì dừng, git cũng ko chạy nữa.<br />Anonymoushttps://www.blogger.com/profile/08856674198501587219noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-53728966461547288862013-06-20T08:49:31.848+07:002013-06-20T08:49:31.848+07:00puts system "git clone "+repo.to_s là gọ...puts system "git clone "+repo.to_s là gọi lệnh system rồi à, ngắn thế :x<br />chỗ này có handle exception không? nếu có lỗi xảy ra thế nào, câu lệnh trả về cái gì hay print ra ????Hhttps://www.blogger.com/profile/18301396724192709702noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-28801851428566468902013-06-19T11:46:01.955+07:002013-06-19T11:46:01.955+07:00ngon nhể, ngắn hơn python bao nhiêu :v ngon nhể, ngắn hơn python bao nhiêu :v Hhttps://www.blogger.com/profile/18301396724192709702noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-64062880475873533392013-06-18T17:22:14.722+07:002013-06-18T17:22:14.722+07:00http://paste.ubuntu.com/5776714/ link này cho đúng...http://paste.ubuntu.com/5776714/ link này cho đúng với output đã bị commentAnonymoushttps://www.blogger.com/profile/08856674198501587219noreply@blogger.comtag:blogger.com,1999:blog-7188813081599719537.post-13529545132810799752013-06-18T17:21:10.212+07:002013-06-18T17:21:10.212+07:00In ruby: http://paste.ubuntu.com/5776710/
dir + re...In ruby: http://paste.ubuntu.com/5776710/<br />dir + repo ở /home/username/<br />test với 1 str thôiAnonymoushttps://www.blogger.com/profile/08856674198501587219noreply@blogger.com