I’m trying to write an if/elif/else statement where if a variable equals “Full” it will cat a file and if the same variable equals “Quick” it will read a different, smaller file. The variable is being set outside of the script and is being exported by export var1=Quick I have Whe…
Tag: linux
Getting linux system UUID which changes after reboot
I’m looking for a linux system session id which is constant over the full runtime of the linux session (as long as uptime is increasing). After each reboot, it should be reset to another (random) value, probably formatted as a uuid. I need this for logging in a global context, where I need to know if tw…
How to use awk regex sort by query string value?
I have a log file with example row: The 7th column of each row looks like this: Output is arranged according to the number of lines in decreasing order containing unique values of t. Desired OUTPUT: I am using awk but it is not giving desired output: It outputs all columns after 7th which is not required. Wha…
jenkins cannot run firefox: No protocol specified Error: cannot open display: :0
I have installed jenkins as a service on linux mint. I am trying to run tests written in python and script cannot run firefox. This line is a problem. … self.browser = webdriver.Firefox() … When i log in as jenkins user, i can’t run firefox. getting this error : (process:3758): GLib-CRITICAL…
Connect to sqlplus with another linux user than oracle
I installed Oracle with sqlplus with user oracle (linux – CentOS). If I try to connect to database being oracle everything goes as expected (sqlplus / as sysdba for example), but I need to do the same thing (maybe not as sysdba, but as a user from database) being another linux user. I added this second …
Use python 2.7 for some apps, while keeping python 2.6 for the OS (linux fedora/centos)
How can I use python 2.7 for some apps, while keeping python 2.6 for the OS? I am using CentOS6.6 (based on RHEL 6 / Fedora 12), and would like to install some recent packages such as meld 3.13, latest rabbitcvs, etc… It requires python 2.6 to run. when I try to run meld 3.13, it says “Meld requir…
Bash : Syntax Error Near Unexpected Token `’table_name’`
I’m getting started learning Laravel 5 in Ubuntu 15.04. So, I’m done creating my database but when I’m trying to insert data using Terminal, I’ve got some error that says Here’s my terminal inputs in my laravel app directory It’s just an simple queries on adding datas insid…
Dynamically find the address at which the kernel is loaded
I’d like to be able to programmatically find out the address at which the linux kernel is loaded. If there are tools out there that already do that, I’d be willing to use them. However, inspecting the PARAMS_PHYS field in the .config during the kernel build is not an option. How could I go about d…
Running git from node.js as a child process?
I am attempting to write a generic command-runner in Node.JS – however that’s not massively important. My setup is as follows: I have a list of string commands that are executed using child_process.exec one after the other. I want to run git from one of these commands, specifically a pull. The loc…
Does libfreenect2 support Kinect v2
I have to work with the Kinect v2 in Linux for a project and am searching for compatible libraries. It is unclear as to whether the Open Kinect project has cracked the Kinect v2 yet. Answer Yes, this library is for the kinect v2. This library (libfreenect2) does not work with the older kinect (360) for which …