看板 Perl 關於我們 聯絡資訊
最近想要將內容回傳到命令列 不是將內容print到console上 #!/usr/bin/perl print "ls -all ./directory"; 上面這樣會print到console上 我希望是能在command line上 還可以修改 %ls -all ./directory 有什麼辦法呢?謝謝大家 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.228.230.95 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Perl/M.1566610720.A.8DD.html
imce: 你是想要system("ls -all ./directory");這樣嗎? 08/24 13:15
cutekid: 他好像想要: 執行程式後,命令列幫他出現 ls - al xxx 08/24 13:41
cutekid: 然後他可以修改指令 08/24 13:42
herculus6502: 自己寫個shell...(逃) 08/24 15:28
cutekid: 樓上XD 08/24 18:03
flu: https://pastebin.com/y9gdFCNc 小改perlcookbook ch15.12 08/24 18:14
flu: X11::GUITest 也是可以啦. 自做的話有現成的像 Term::CLI 08/24 18:18
flu: 上面連結的code看不出來 但連Term::ReadLine::Gnu 也要先裝 08/24 18:20
cutekid: 推推,好厲害(Y) 08/25 02:30
flu: 其實算是..拾人牙慧 :D 08/26 08:08
cutekid: 讚,原來真的可以辦到! 08/26 13:53
bearwei77: 謝謝f大 我今天成功使用了 08/26 17:39
herculus6502: 讚個。其實perl還是滿厲害的… 08/28 13:46
ViewMoon: 不是perl的話: writevt.c 10/29 04:55