我在mac OS上使用sed命令,以下是文本。 $ cat pets.txt
This is my cat
my cat's name is betty
This is your dog
your dog's name is frank
This is your fish
your fish's name is george
This is my goat
在某些操作系統中,如Ubuntu,Debian等cal返回當前日曆並突出顯示今天。而cal -h關閉高亮今天: 但在一些操作系統,像Arch Linux的-h PARAM顯示日曆的幫助。 我做和Lua一個小腳本: function foo()
local f, err = io.popen('cal -h', 'r')
if f then
local s = f:r
我在mac OS上使用sed命令,下面是文本。 $ cat pets.txt
This is my cat
my cat's name is betty
This is your dog
your dog's name is frank
This is your fish
your fish's name is george
This is my goat