I’m seeking for a way to automatize the configuration of some tasks i do, but, i am having some trouble to give the order to the programs from the terminal. I have actually to give, every time i try to configure some Routers, the same commands always and always, but, i’m looking for a way to creat…
Avoiding header collisions when cross compiling
I have a linux project I want to port to windows. Under Linux I did set up my makefile to run x86_64-w64-mingw32-g++ when I do call make ARCH=win The problem is that some headers I need (tcl.h and friends) are located under ‘/usr/include’ and if I pass that directory with the -I flag I will get a …
Cronjob is not running in Linux
So I am trying to automate backups to S3 buckets through linux. The script I am trying to run is The cronjob to run that script is 44 11 * * * ./backup.sh However whenever I try to run the backup script (by updating cronjob) it does not seem to be working at all. Any ideas why it will not
How can I use python 3 tkinter in Linux?
I tried the following program in Win10, it works But I want to use it in linux mint and it display nothing (it display a window with a button on my win10) from tkinter import * tk=Tk() btn= Button(tk,text=”ttk”) btn.pack() I want it display a window with a button on my linux mint Answer You need t…
Linux cut, paste
I have to write a script file to cut the following column and paste it the end of the same row in a new .arff file. I guess the file type doesn’t matter. Current file: The output should be: how can I do this? using a Linux script file? Answer Brief explanation, ^([^,]*) would match the first field which…
Get all mount points in kernel module
I’m trying to get all the mount points in a kernel module. Below is what I’ve come up with. It segfaults because of the strcat. Is this the correct way to get the mount points? Will this work? if so how do i fix the segfault? If not, how does one go about getting the mount points in a linux
Using bash, how can I remove the extensions of all files in a specific directory?
I want to keep the files but remove their extensions. The files do not have the same extension to them. My end goal is to remove all their extensions and change them to one single extension of my choice. I have the second part down. My code so far: Answer You don’t need an external command find for this…
Replace text between two lines with contents of a file stored in a variable in sed
Let’s say I have a file called original.txt with this content: red blue water food tree gray white Also I have a file called new.txt with this content: green black yellow purple Now I want to write a script that replaces the lines between blue and gray in original.txt with the contents of new.txt, so it…
How to undo “mv file -” command in Ubuntu [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
How to replace lines that contains integers by using sed
I have a file that contains two fields. The first field may or may not contain an Integer. If it contains an integer and a dot follows the integer I would like to manipulate part of second field. So As an example: I couldn’t make it since I have very limited knowledge in regex. I would be very appreciat…