开发者

Is there a command called 'screen_it' in ubuntu?

开发者 https://www.devze.com 2023-01-25 22:06 出处:网络
I was goin开发者_如何学JAVAg through this shell script and couldn\'t understand the command \'screen_it\' used there. Any help appreciatedThat\'s a function, defined at line 109:

I was goin开发者_如何学JAVAg through this shell script and couldn't understand the command 'screen_it' used there. Any help appreciated


That's a function, defined at line 109:

function screen_it {
    screen -S nova -X screen -t $1
    screen -S nova -p $1 -X stuff "$2$NL"
}

Quoting from Screen's manual:

stuff string

Stuff the string string in the input buffer of the current window. This is like the "paste" command but with much less overhead. You cannot paste large buffers with the "stuff" command. It is most useful for key bindings. See also "bindkey".

So, from that description, stuff "$2$NL" will "paste" the second argument and add a newline.


screen_it is a function defined on line # 109 https://github.com/vishvananda/novascript/blob/master/nova.sh#LID109

0

精彩评论

暂无评论...
验证码 换一张
取 消