terminal

Setting runtime path

我怕爱的太早我们不能终老 提交于 2019-12-24 13:33:26
问题 I am trying to install a package using luarocks . This is the output I get: [100%] Linking CXX shared module libcustn.so [100%] Built target custn Install the project... -- Install configuration: "Release" -- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lib/libstn.so -- Set runtime path of "/home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lib/libstn.so" to "$ORIGIN/../lib:/home/tex/torch/install/lib" -- Installing: /home/tex/torch/install/lib/luarocks/rocks

Regular expression incremental parsing

匆匆过客 提交于 2019-12-24 12:43:44
问题 Are there languages or tools that support the parsing of regexes on a character-by-character basis? I think this may be equivalent to "regexes on streams" which is something that seems to be one of the features of the upcoming Perl version 6. Basically I want to do this because I'm building a tool that does translation of a terminal stream over a pseudo-terminal, and it occurred to me that the ultimate sort of flexibility that should be attainable is by allowing the specification of regex

unable to read opensslv.h:No such file or directory

点点圈 提交于 2019-12-24 12:25:51
问题 I am getting the following error when I try to install OpenSSL version 1.0.1h on MAC OS (Mountain Lion) Terminal, unable to read opensslv.h:No such file or directory I am using the following command in the Terminal, sudo /tmp/ssl/openssl-1.0.1h/Configure darwin64-x86_64-cc ––prefix=/usr no-threads shared I am following the instructions on this link. What is wrong here? 回答1: I am following the instructions on this link. What is wrong here? You did not follow the instructions. It looks like you

ncurses support for italics?

梦想与她 提交于 2019-12-24 11:59:13
问题 Some terminals, such as urxvt, support display text in italics via the sitm and ritm terminfo entries: echo `tput sitm`italics`tput ritm` I'd like to use this in an application I've got which wants to render real italics into the console. Unfortunately the application is ncurses-based, and ncurses doesn't seem to have a attribute for italics --- it's got a whole bunch, including invisible text (which I'm sure is useful for something), but no italics. Does anyone know of a way to trick ncurses

Creating a job with credentials in jenkins only in command lines

浪尽此生 提交于 2019-12-24 11:57:35
问题 I am only allowed to work with the command line terminal on Ubuntu. I need to create a job in Jenkins with security credentials. I already installed Jenkins in my machine, but the access is open. If I set up security credentials on Jenkins, how can I specify these on the command line? Thanks! 回答1: Follow this steps Generate a public ssh-key in the user you want to work with from the command line. ssh-keygen Just press enter whenever yo are asked to enter some value. Copy the content of the

How to create a shell script to launch 3 terminals and execute a set of commands in each?

守給你的承諾、 提交于 2019-12-24 11:35:46
问题 Currently, I open 3 terminals ('openocd session','telnet session' & 'gdb session') and execute 'a set of commands' in each terminal every time I flash my image on target. Is is possible to put this in one shell script file and run at once? (Commands on each terminal are NOT dependent on others; except that the terminals should be opened in the order mentioned above) Thanks in advance ! 回答1: Which terminal are you using? A terminal like xterm can start a program instead of a shell. Simply run

OSX: How can an application running in Terminal.app change the font size of its window?

喜夏-厌秋 提交于 2019-12-24 11:27:57
问题 How can an application running in a Terminal.app window change its window's font size? No solution (such as a system call to applescript, etc) too odd! 回答1: It's relatively simple to do this; the only real caveat is that you might need to adjust the window size if you want it to remain consistent with it's proportions, since the font size seems to affect it. Applescript called from Bash : #!/bin/bash osascript <<EOF tell application "System Events" tell process "Terminal" set frontmost to

firing a command through terminal in Ubuntu using Java Runtime.exec

喜夏-厌秋 提交于 2019-12-24 11:02:25
问题 This is fairly simple in Windows, but a little tricky in Linux. I am using Runtime.getRuntime().exec(new String[] { "/bin/bash", "-c", "java -classpath /home/4/byz/Orc" }); where Orc is the class file with a main function. But nothing happens. Are there any settings ? Am I doing something wrong ? I wish the java program to run in the terminal. EDIT Here is the solution: String[] cmdArray = {"gnome-terminal","java -classpath /home/r/byz/ Orchestrator"}; try { Runtime.getRuntime().exec(cmdArray

Why is terminal blank after running python executable?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 10:44:38
问题 I added the hashbang line at the beginning of the python script ( #!/usr/bin/python ) and gave it executable privileges via chmod +x file.py command but after clicking on the module to run it, the terminal pops up but is blank. Would it have something to do with the python interpreter possibly not being in the specified path? 回答1: It would appear that that is not a valid shebang . Try #!/usr/bin/python (Note the exclaimation after the hash mark.) Edit in response to comments from OP: So,

How to change termios configuration, so that getc() immediately returns when user presses <tab> key?

99封情书 提交于 2019-12-24 09:00:11
问题 I want to implement auto-completion feature for my CLI application. The default behavior of getc() is returning only when the following list of characters are entered: NEW_LINE or EOF. I want to add TAB to this list so that I can trigger my auto-completion algorithm. Is there a way to do it, for instance, using termios? The editline library (http://www.thrysoee.dk/editline/) can do it but I could not figure how it does? 回答1: Handling of terminal IO takes about 40 pages in the second edition