Skip to content

how to replace decimal in linux

I have a csv file with error in one field, the fields are separated by “,” but the error is in decimal field, for example 34.25,” i need replace by 34.25″,”. Search ,” and replace by “,” is not option, others fields will modified. Answer Check that the character…

Using grep and * to get the exact file name

I have following heapdump files now if I use I get following output But I use I get no output. Could anybody help where is my mistake and how to search the heapdump files. My expected output is should give me due to some reason I could not use Answer It looks like you’re confusing glob patterns with reg…

Install Section of rpm package

I am naive on creating RPM packages. I want to know the meaning of below command: Answer in the %install section, you are supposed to install all your files in the %{buildroot] directory; just the way they will be installed on the final system. he cleans this directory. I never use this; since my buildroot is…

Compiling for 32 bit on a 64 bit DMD

I am using xubuntu 16.04 amd64, and use the D Language. I used to use DMD i386 on a 32 bit machine (ubuntu 14.04), but now, for some reason, I can’t (or don’t want to) install DMD_i386 on my system, so I installed the one for amd64. All of my projects were written on a 32 bit machine, and I

How to restrict a particular command in bash?

I have bash-3.2.tar.gz I have all the tools needed to compile the bash. Now I need to restrict a command in the compiled bash binary, e.g. I want to restrict the command “kill” in the compiled bash binary. How to achieve this? Thanks in advance. Answer It’s not clear exactly what you’r…

C++ get source file directory in Linux

This question is many time asked and I referred all, but I need bit different. I am using macbook -> Clion (IDE) for C++ My program file location /Users/Kandarp/ClionProjects/SimulationParser/main.cpp When I use following function for get current directory it gives different file (I think actual path where…

open file from remote host with Kate

Is it possible to open a file from a remote host with Kate like you can with vim: vim scp://root@cc3//var/log/dp.log? I’ve tried the following but neither option seems to work: kate scp://root@cc3//var/log/dp.log & and kate fish://root@cc3//var/log/dp.log & Answer By design, Kate interacts with …