真的好酷,是不是?Betty理解我输入的“whats my username”短语,然后运行“whoami”命令,最后输出结果。
让我们也来看其他命令。
如果你的输入不够准确,Betty也能以多种方式回应你。例如,我们运行下面的命令:
1 2
betty whats myname
Betty不确定她应该查找系统用户名还是用户全名。这种情况下,她会询问你多个问题来找到准确的结果。如你下面所见,Betty问我想要运行哪一条命令(whoami 还是 finger $(whoami) | sed ‘s/.://;q’)[LCTT译注,需要你的系统已经安装finger]。我只想知道我的用户名,所以我选择数字1。
1 2 3 4 5 6 7 8 9 10
Betty: Okay, I have multiple ways to respond. Betty: Enter the number of the command you want meto run, or N (no) if you don't want me to run any. [1] whoami Gets your system username. [2] finger $(whoami) | sed 's/.*: *//;q' Gets your full name. 1 Betty: Running whoami sk
Count: betty how many words are in this directory betty how many characters are in myfile.py betty count lines in this folder (Note that there's many ways to say more or less the same thing.)
Config: betty change your name to Joe betty speak to me betty stop speaking to me
Datetime: betty what timeis it betty what is todays date betty what month is it betty whats today
Find: betty find me all files that contain california
Internet: betty download http://www.mysite.com/something.tar.gz to something.tar.gz betty uncompress something.tar.gz betty unarchive something.tar.gz to somedir (You can use unzip, unarchive, untar, uncompress, and expand interchangeably.) betty compress /path/to/dir
iTunes: betty mute itunes betty unmute itunes betty pause the music betty resume itunes betty stop my music betty next song betty prev track betty what song is playing (Note that the words song, track, music, etc. are interchangeable)
Fun: betty go crazy betty whats the meaning of life ...and more that are left for you to discover!
Map: betty show me a mapof mountain view
Meta: betty what version are you (or just betty version) betty whats your github again
Permissions: betty give me permission to this directory betty give anotheruser ownership of myfile.txt
Process: betty show me all processes by root containing grep betty show me all my processes containing netbio
Sizes: betty show size for myfile.txt
Spotify: betty play spotify betty pause spotify betty next spotify betty previous spotify
User: betty whats my username betty whats my real name betty whats my ip address betty who elseis logged in betty whats my version of ruby
Web queries: betty turn web on betty please tell me what is the weather like in London