Skip to content

Tag: linux

mistake in cin.getline() to develop a shell

I am developing a limited version of shell for my self. Here is a C++ program What I am not able to understand is when I compile this program I am getting error in line and the error is following I do a $ g++ p3.7.cpp What is the mistake above I am doing. Do I need to include some

C – invalid conversion from ‘void*’ to ‘void (*)()’

I am getting the following when I try to compile my program: These are the lines of code that are causing the errors: What am I missing? Answer You have void *function but void* is not a correct type of a function pointer. void (*)() is a type of a function pointer, so probably you should change your function…

Can not INSERT INTO Postgresql

simplechan In other words, I installed a message board named simplechan, but I can not log in to a site dedicated to the administrator. Because you need a password to get there. I do not know the password. I entered in psql as follows In “simplechan/sql/create_table_query.sql” it was drawn as foll…

Search and Replace ( multiple lines )

Hello StackOverflow Community! I’m working on a bash script to change in Dynamic text file, I want to replace multiple lines with one line. Ex: This example, I want to replace THIS With KKKKK Before script After script I found a script to replace using ( sed ) but it doesn’t replace multiple lines…

Parse command `watch` with `InputStream`

I have this command: How I can to parse output from this command? When I get InputStream of this Process, I get an empty line every time. — I used to restart the command via Java, creating a new thread and all over again. Now, I decided to implement it with the help of watch. Snippet of code: Answer A

optimizing awk command for large file

I have these functions to process a 2GB text file. I’m splitting it into 6 parts for simultaneous processing but it is still taking 4+ hours. What else can I try make the script faster? A bit of details: I feed my input csv into a while loop to be read line by line. I grabbed the values from the