I have two text files in tab delimted format like following. file_1 file_2 these two file contents were stored into two different variables. Now I would like extract the lines which has “+” symbol in column 4 and store it in the variable and later print it. But it throws me error message: Here is …
Tag: linux
Visual Studio 2015/Linux extension produces a “collect2 : error : ld returned 1 exit status” with Cygwin
I am currently trying the Linux Extension of Visual Studio 2015. I plan to have several target machines using various distribs. So far, my testing machine is a Windows 7 with an up-to-date Cygwin with all needed packages (openssh, g++, gdb…) installed. The test I’m conducting consists in a very si…
dlopen fails in chroot
I’m attempting this: I have an environment defined in /chroot/debian6.0/ where I have bound some directories and created other ones. One is libs/ which contains the library libOne.so and its dependencies So: This library has been compiled in the chroot environment, and I want to open it with a process r…
How Python reads a file when it was deleted after being opened
I’m having difficulties in understanding the concept of how Python reads a file when it was deleted after being open’ed. Here is the code: Text and binary modes give the same result. I tried this also for big files with more than 1Gb size and they were also read after being deleted. The operation …
Isn’t it possible for a file to not be visible for other processes?
I have a Java application which is invoked from a shell script and creates a file, then writes some content to it. It works something like this: The resulting file will be quite large (up to 100MB). The issue is that opening the FileOutputStream creates an empty file and makes it available to other processes …
Linux – Do a command repeatedly for a certain length of time
I know what the command watch -n does. I would like to do something like the following: Essentially I want to repeat a command every 5 seconds, then stop after 30 minutes has passed. I’m missing the stop 30 minutes part. What command should I use to achieve this? Thanks. Answer Use timeout:
PostgreSQL 9.5 doesn’t start after reboot with systemd
I’m having a problem with PostgreSQL 9.5+173 on Ubuntu 16.04 and I happened to stumble across the following threads in my research that somewhat describes the behavior I’m seeing: https://www.postgresql.org/message-id/CAFyxdeT%2B%3Dx-d0oNbFPoe%2B4xnt0Qdfi%2BzAEn%2BrQmEK0AZbJFRtg%40mail.gmail.com h…
I remove proxy from git but still showing the error how to resolve it?
My git is stuck whenever now I try pull,push or clone I remove the proxy but still no positive response from git. Last time I used this command for proxy: I try these commands: but still getting this response when I clone the repository or want to pull or push! Answer After using these comands These two comma…
Difficulty with python while installing YouCompleteMe in vim
I’ve followed these instructions, in order to install YouCompleteMe in Vim, but when I issue: The following error message comes up: and now I’m stuck, what should I do? Answer I checked YouCompleteMe’s build system and it uses a custom build script that uses the Python module distutils to fi…
Accessing Oracle Wallet using Oracle sqlplus Instant client
I’ve configured Oracle wallet successfully in my Linux server(Linux 2.6.32-642.4.2.el6.x86_64 GNU/Linux). When I try to execute the below command using Database connection string, it works perfect. $/sqlplus /@TESTDB SQL*Plus: Release 11.2.0.3.0 Production on Tue Oct 18 07:12:49 2016 Copyright (c) 1982,…