The marks of the students are given as a table in the following format Name | rollno | marks in exam1 | marks in exam 2 … i.e. There is one record per line and each column is separated by a | (pipe) character.At the end of all the records I want to add extra lines which contains information about
Tag: linux
Passenger repository certificate verification failed
I want to install Passenger server on my virtual machine, so I do the following: But after I update I get this errors: I already installed it previously many times and had no problems. I have no idea what might go wrong. Answer Fixed that by reinstalling Ubuntu on clean VM. This issue might appeared because I…
Interpreting STRACE output – pipes and forks
I have the following code written in C, taken from https://beej.us/guide/bgipc/html/multi/pipes.html: When compiling and running this code in the terminal using strace I get the following output: Can anybody explain, line by line, what is going on in the strace output? I’ve attempted to research how to …
TortoiseGit – copy via sftp on pull
Intro: I have 2 folders which are on the same GIT repository, one is on a very slow Samba network drive, and one locally. using GIT on samba is extremely slow, but the Samba is my server, which is actually vmplayer running ubuntu server on a windows machine. My question is: is it possible to automatically cop…
Is iptables thread safe?
This seems to me to be a basic question, but google and SO fail to give me an answer. As the title says, is iptables thread safe? If I have multiple processes making calls to iptables, should I create a lock for myself? There seems to be some threads from 2009 querying if netfilter is thread-safe, with no sol…
Getting ‘Insufficient rights’ and ‘userhelper must be setuid root’ error/warning while using consolehelper
‘/usr/bin/myapp’ is a link to ‘/usr/bin/consolehelper’. When non-root user try to run ‘/usr/bin/myapp’ on command prompt, it shows ‘userhelper must be setuid root’. But running with ‘sudo /usr/bin/myapp’ it works fine. While using with GUI, it shows …
I read more than I write in file
I have a file, partitioned in fixed sized blocks. I am copying a test_file.txt into the 3rd block of the file. I read and copied 18 bytes. Then I am trying to copy from the file that very same .txt file I just imported to a newly created .txt, but I am writing 256 bytes to the new file. Moreover,
system call open() creating executable
So my code creates and writes to the out_file properly. However, the file is an executable for some reason. I think the fault is in my open() call but I can’t seem to find why. Answer man 2 open explains why: So if you want a file that’s not executable, you can use: 0666 will suggest read/write fo…
time option doesn’t work
I tried to measure execution time and format it with this command: But such command works: I tried to determine where another time is located, but all showes to /usr/bin/time or or How to define where another time is located? Answer Users of the bash shell need to use an explicit path in order to run the exte…
Grep out tags from git repo
Trying to sed out the different tags from my repo with shell: Returns, How can I grep out only the different tags as v1, v2, v3, v4: Answer What about good old grep and uniq :